+

Search Tips   |   Advanced Search

Assembling JAX-RS web applications

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

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

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

Create the WAR package using assembly tools.

  1. Package the compiled JAX-RS Java classes into the WEB-INF/classes directory of the WAR package.

  2. Package web.xml for the web application in the WEB-INF/ directory into the WAR package.


Results

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 concepts

  • Development and assembly tools


    Related tasks

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