WAS v8.5 > Develop 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, 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.

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, we 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.


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.


Related


Configure web.xml for JAX-RS servlets
Configure web.xml for JAX-RS filters


+

Search Tips   |   Advanced Search