Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress Servlet Development Guide

9.5 Deploying Servlets

At runtime, the Agent needs to access

The Deployment Descriptor File, web.xml

For the SessionExample servlet in the examples directory, the web.xml file contains the following configuration:

This file must be deployed to the context directory so it is accessible to the Agent at runtime. The Agent's default deployment settings assume <installdir>\apps\servlets\<servicecontextname> for a servlet's web.xml file. You can change this default location if you wish, discussed in Section 9.5.1.

The Servlet, Filter, and Listener Libraries

The files that hold the compiled servlets, filters, and listeners must be located in the path the Agent uses for runtime library loading. The setup script rwsfvars provided with HydraExpress adds <installdir>/lib and <installdir>/apps-lib directories (for UNIX or Linux), or the <installdir>\bin and <installdir>\apps-bin directories (for Windows) to the appropriate environment variable. The Agent loads compiled objects in these directories with no additional configuration.

The makefiles for the servlet examples are designed to deploy to the apps or lib directories, as follows:

Table 3: Location of deployed files

System Deployment Directory Deployed Files
Windows <installdir>/lib For release builds: <servletName>12d.dll
For debug builds: <servletName>15d.dll
UNIX/Linux <installdir>\bin For release builds: <servletName>12d.so
For debug builds: <servletName>15d.so

To install the compiled object files, copy the files to a directory specified in the runtime library loading path.

For all HydraExpress servlet examples, the example makefiles copy the compiled library to <installdir>/lib for UNIX/Linux, and to <installdir>\bin on Windows platforms.


The Web services examples located in <installdir>\examples\webservices instead deploy by default to <installdir>/apps-lib for UNIX or Linux, and to <installdir>\apps-bin for Windows.

If you wish to change the location of the libraries, you can edit the provided examples makefile, but then must ensure that the location is in your system's PATH environment variable. See Section C.1.

For more information on the deployed libraries, see Section 3.6, "Installing the Compiled Object Files."

9.5.1 Changing the Default Deployment Directories

The location of the web.xml deployment directory is defined in the Agent configuration file rwagent.xml, specified by the value of the rwsf:webappsDir property, like so:

If you wish to change where you deploy a servlet's web.xml, change the value in the rwagent.xml file.


Be aware that if you change the default location of the deployment directory in rwagent.xml, any Web service projects that are generated using the HydraExpress code generator will not deploy correctly without edits to the project-level generated makefile. Code generation is not discussed in this guide, nor used in servlet development; instead, see the
HydraExpress Web Service Development Guide.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.