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 one 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.0.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 ...

Get RESTful Java Web Services - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.