Building your first RESTful web service with JAX-RS
In the earlier sections, we discussed the commonly used annotations and APIs in JAX-RS that you may need to be aware of while building REST APIs with JAX-RS. It is now time for us to put all these theories into practice. In this section, we will build a simple yet complete end-to-end RESTful web service by using JAX-RS.
Setting up the environment
This example uses the following software and tools:
- Java SE Development Kit 8 or newer
- NetBeans IDE 8.2 (with Java EE bundle) or newer
- Glassfish Server 4.1 or newer
- Maven 3.2.3 or newer
- Oracle Database Express Edition 11g Release 2 or newer with HR sample database schema
- Oracle Database JDBC Driver (
ojdbc7.jar
or newer)
Note
Detailed instructions for procuring and setting up all the required tools for running the examples used in this book are discussed in the appendix.
Make sure that your machine has all the tools ready before starting with the tutorial. In this tutorial, we will build a RESTful web service...