In order to enable JAX-RS in a Java EE application the developer must set up the configuration in the web deployment descriptor file. JAX-RS requires a specific servlet mapping to be enabled, which triggers the provider to search for annotated classes.
The standard API for JAX-RS lies in the Java package
javax.ws.rs and in its subpackages. Interestingly, the Java API for REST style interfaces sits underneath the Java Web Services package
For your web applications, you must configure a Java servlet with just fully qualified name of the class
javax.ws.rs.core.Application. The Servlet must be mapped to a root URL pattern in order to intercept REST style requests.
The following is an example code of such a configuration: