Deploying Servlets
At runtime, the Agent needs to access
*The servlet’s deployment descriptor (also called “servlet configuration”) web.xml file
*The servlet, filter and listener libraries
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 Changing the Default Deployment Directories.
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
Deployment Directory
Deployed Files
For release builds: <servletName>12d.dll
For debug builds: <servletName>15d.dll
For release builds: <servletName>
For debug builds: <servletName>
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.
NOTE: 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 Environment Variables.
For more information on the deployed libraries, see Installing the Compiled Object Files.