Configure JAX-RS web applications
Subtopics
- Configure JAX-RS applications using JAX-RS 1.1 methods
We can configure Java API for RESTful Web Services (JAX-RS) applications in multiple ways depending on our needs. To take advantage of the Java EE 6 functionality, we can use the annotation scanning capabilities. By using annotation scanning, we can omit a JAX-RS javax.ws.rs.core.Application subclass or have a minimally defined javax.ws.rs.core.Application subclass.- Configure the web.xml file for JAX-RS servlets
The web.xml file contains information about the structure and external dependencies of web components in the module and describes how the components are used at run time. To enable the web container to run Java API for RESTful Web Services (JAX-RS) applications, we can configure the web.xml file to point directly to the IBM JAX-RS servlet. When using servlets, we can define a servlet path in the web.xml file that is appended to the base URL.- Configure the web.xml file for JAX-RS filters
The web.xml file contains information about the structure and external dependencies of web components in the module and describes how the components are used at run time. To enable the web container to run Java API for RESTful Web Services (JAX-RS) applications, we can configure the web.xml file to define filters that indicate the possible URLs on which the filter can be invoked.- Configure JAX-RS applications using JAX-RS 1.1 methods
We can configure Java API for RESTful Web Services (JAX-RS) applications in multiple ways depending on our needs. To take advantage of the Java EE 6 functionality, we can use the annotation scanning capabilities. By using annotation scanning, we can omit a JAX-RS javax.ws.rs.core.Application subclass or have a minimally defined javax.ws.rs.core.Application subclass.- Configure the web.xml file for JAX-RS servlets
The web.xml file contains information about the structure and external dependencies of web components in the module and describes how the components are used at run time. To enable the web container to run Java API for RESTful Web Services (JAX-RS) applications, we can configure the web.xml file to point directly to the IBM JAX-RS servlet. When using servlets, we can define a servlet path in the web.xml file that is appended to the base URL.- Configure the web.xml file for JAX-RS filters
The web.xml file contains information about the structure and external dependencies of web components in the module and describes how the components are used at run time. To enable the web container to run Java API for RESTful Web Services (JAX-RS) applications, we can configure the web.xml file to define filters that indicate the possible URLs on which the filter can be invoked.