Network Deployment (Distributed operating systems), v8.0 > Develop and deploying applications > Develop web services - RESTful services > Develop JAX-RS web applications > Configure JAX-RS web applications


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 your needs.

To take advantage of the Java EE 6 functionality, you can use the annotation scanning capabilities. By using annotation scanning, you can omit a JAX-RS javax.ws.rs.core.Application subclass or have a minimally defined javax.ws.rs.core.Application subclass.

The JAX-RS 1.1 specification supports several new ways to configure a JAX-RS application.  We can use the built-in annotation scanning to help automatically configure the application. We can optionally add javax.ws.rs.core.Application subclasses to the application and then add the URL patterns required using either the javax.ws.rs.ApplicationPath annotation or a web.xml servlet definition. When using the IBM JAX-RS implementation, you do not have to specify the servlet class implementation because it is automatically added to the configuration of the web module by the time the JAX-RS application is started.

When using a web.xml file, use a Java Servlet 3.0 web.xml file.


Procedure


Results

You have configured your JAX-RS application using JAX-RS 1.1 supported methods by taking advantage of annotation scanning to help automatically configure the application.
Configure the web.xml file for JAX-RS servlets
Configure the web.xml file for JAX-RS filters

+

Search Tips   |   Advanced Search