NonStop Servlets for JavaServer Pages (5.0) System Administrator's Guide

Configuring NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide525644-002
3-12
web.xml
Example 3-7 shows a servlet class file, SessionSnoop, which has a priority of 3. Files
that have a higher priority are loaded before this one. Note that the servlet class name
is SessionSnoop, but a URL could reference the servlet by the servlet name Snoop.
Defining a Session Timeout Value
A session timeout parameter could be in either of the two versions of the web.xml file.
You can define a default session timeout interval value for all sessions created in the
web application by using the <session-config> and <session-timeout>
elements in the web.xml file. The specified timeout value must be expressed in
minutes, as shown in Example 3-8.
Your Application Version of web.xml
Each application can have a copy of web.xml, the deployment descriptor, for
example:
/webapps/myapp1/WEB-INF/web.xml
This file overrides any settings made in the web.xml file at the $NSJSP_HOME/conf
level.
Example 3-7. Preloading Servlets
<servlet>
<servlet-name>Snoop</servlet-name>
<servlet-class>SessionSnoop</servlet-class>
<load-on-startup>3<load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Snoop</servlet-name>
<url-pattern>/Snoop</url-pattern>
</servlet-mapping>
<servlet-mapping>
</servlet-name>Snoop</servlet-name>
<url-pattern>/servlet/Snoop</url-pattern>
</servlet-mapping>
Example 3-8. Defining a Session Timeout Value
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>