+

Search Tips   |   Advanced Search

Assembling JAX-RS web applications

After developing the Java class files for our Java API for RESTful Web Services (JAX-RS) web application and edit the web.xml file to enable the JAX-RS servlet, assemble the application.

Identify the assembly tool to use to assemble the application. The web application is assembled into a web application archive (WAR) package. We can assemble the WAR package into an enterprise archive (EAR) package if required.

Before assembling the web application, ensure that we have customized the web.xml file to enable the JAX-RS servlet or filter configuration. To learn more, see the information about configuring the web.xml file for the JAX-RS application.


Tasks

Create the WAR package using assembly tools.

  1. Package your compiled JAX-RS Java classes into the WEB-INF/classes directory of our WAR package.
  2. Package the web.xml file for our web application in the WEB-INF/ directory into the WAR package.

A WAR package is created containing the web application. If needed, we can add the WAR package to an EAR package. The application server can deploy either the WAR or EAR packages.


What to do next

Deploy the web application.


Related:

  • Development and assembly tools
  • Configure the web.xml file for JAX-RS servlets
  • Configure the web.xml file for JAX-RS filters