# The Java EE 7 Tutorial

# 31 JAX-RS: Advanced Topics and an Example

The Java API for RESTful Web Services (JAX-RS, defined in JSR 339) is designed to make it easy to develop applications that use the REST architecture. This chapter describes advanced features of JAX-RS. If you are new to JAX-RS, see Chapter 29, "Building RESTful Web Services with JAX-RS" before you proceed with this chapter.

JAX-RS is integrated with Contexts and Dependency Injection for Java EE (CDI), Enterprise JavaBeans (EJB) technology, and Java Servlet technology.

The following topics are addressed here:

- Annotations for Field and Bean Properties of Resource Classes

- Validating Resource Data with Bean Validation

- Subresources and Runtime Resource Resolution

- Integrating JAX-RS with EJB Technology and CDI

- Conditional HTTP Requests

- Runtime Content Negotiation

- Using JAX-RS with JAXB

- The customer Example Application