15.3. Deploying and Installing a Web Application

Before deploying a Web application in the JOnAS application server, first package its components in a WAR file as explained in Chapter 18 WAR Packaging.

For Apache ANT, refer to the target WAR in the $JONAS_ROOT/examples/earsample/build.xml file.

Next, install the WAR file into the $JONAS_ROOT/webapps directory.

NoteNote
 

Be aware that the WAR file must not be installed in the $CATALINA_HOME/webapps directory.

Then, check the configuration. Before running the web application, check that the web service is present in the jonas.services property. The ejb service may also be needed if the Web application uses enterprise beans.

The name of the WAR file can be added in the jonas.service.web.descriptors section.

Finally, run the application Server:

jonas start

The web components are deployed in a web container created during the startup. If the WAR file was not added in the jonas.service.web.descriptors list, the web components can be dynamically deployed using the jonas admin command or JonasAdmin tool.