iTP Secure WebServer System Administrator's Guide (iTPWebSvr 5.1+)

Using NonStop Servlets for JavaServer Pages With
The iTP Secure WebServer
iTP Secure WebServer System Administrator’s Guide—522659-001
9-21
The web.xml File
For example:
<Context path="/examples" docBase="webapps/examples" debug="0"reloadable="true" >
</Context>
Log Files
The file also sets the location of the files that contain logs of low-level events. See Logs
and Error Conditions on page 9-38 for details.
The web.xml File
This file is known as a deployment descriptor. It contains configuration contexts for
servlets. There is a default version of web.xml located in servlet_jsp/conf. This sets the
behaviors of all applications and their related resources.
There is also a version of the same file that you can create within the WEB-INF
subdirectory of any specific application - which will override the "global" web.xml file
and thus support specific servlet control.
The Default Version
The web.xml file in /usr/tandem/webserver/servlet_jsp/conf provides the default path
contexts and controls of servlets and jsp. Here are some example xml control elements:
Preloading Servlets
A set of servlets can be automatically loaded on startup time by using the <load-on-
startup> element in the web.xml file.
The load-on-startup element indicates that this servlet should be loaded on the startup of
the web application. The content of this element must be a positive integer indicating the
order in which the servlets should be loaded. Lower integers are loaded before higher
integers. If no value is specified, or if the value specified is not a positive integer, the
container is free to load it any time in the startup sequence. For example:
<servlet>
<servlet-name>
Snoop
</servlet-name>
<servlet-class>
SessionSnoop
</servlet-class>
<load-on-startup>
3
</load-on-startup>
</servlet>
The example shows a servlet class file, SessionSnoop, which has a priority of 3. Files
with a higher priority will be loaded before this one. Note that the servlet class name is
SessionSnoop, but a URL would reference it by the servlet name Snoop.