JAX-RS applications have the root resource classes packaged in a war file. There are 2 means of configuring JAX-RS applications.
- Use @ApplicationPath annotation in a subclass of
javax.ws.rs.core.Applicationthat is packaged in the WAR file.
- Use the <servlet-mapping> tag inside the web.xml of the WAR. web.xml is the deployment descriptor of the application where the mappings to the servlets can be defined.