WAS v8.5 > Develop applications > Develop web services - RESTful services

Assemble 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 the web.xml file 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. You must add the JAX-RS libraries to the web application in the WEB-INF/lib directory before you assemble the web application.

By packaging your JAX-RS application classes into the WEB-INF/classes directory of your WAR package and editing web.xml, we can use the built-in JAX-RS runtime environment.

Create the WAR package using assembly tools.

  1. Package your compiled JAX-RS Java classes into the WEB-INF/classes directory of your WAR package.
  2. Package the web.xml file 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.

Deploy the web application.


Related concepts:

Development and assembly tools


Related


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


+

Search Tips   |   Advanced Search