Assembling JAX-RS web applications

After you develop the Java class files for your 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.

Before you begin

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

Before assembling the web application, ensure that you 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.

About this task

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 the web.xml file, you can use the built-in JAX-RS runtime environment.

Procedure

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 your web application in the WEB-INF/ directory into the WAR package.

Results

A WAR package is created that contains the web application. If needed, you 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.




In this information ...


Related concepts

IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms of Use | Feedback

Last updatedLast updated: Sep 19, 2011 5:16:49 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-base-iseries&topic=twbs_jaxrs_assemble
File name: twbs_jaxrs_assemble.html