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 Guide522659-001
9-22
The web.xml File
Defining a Session Timeout Value
This parameter could be in either of the two versions of the web.xml file.
The default session timeout interval value for all sessions created in the web application
can be defined in the web.xml file using session-config and session-timeout elements.
The specified timeout value must be expressed in a whole number of minutes. For
example:
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
Your Application Version of web.xml
Each application could have a copy of web.xml, the deployment descriptor, at the root
level of the application, for example:
/webapps/myapp1/WEB-INF/web.xml
This file overrides any settings made in the web.xml file at the servlet_jsp/conf level.
Here are some further examples of xml elements used in either web.xml file.
Initialization of Servlets
You could initialize servlets in either of the two versions of the web.xml file.
If portability is a requirement, you may prefer to put the initialization within the
application version of web.xml. This is the deployment descriptor location used when
packing or unpacking web application archive (WAR) files.
The init-param element contains a name/value pair as initialization parameter of the
servlet. For example:
<servlet>
<servlet-name>
your alias servlet name
</servlet-name>
<servlet-class>
your servlet name
</servlet-class>
<init-param>
<param-name>name1</param-name>
<param-value>value1</param-value>
<param-name>name2</param-name>
<param-value>value2</param-value>
</init-param>
</servlet>
As noted previously, the servlet name is an alias of the servlet class name. The alias
allows you to change the name of the class without having to make changes to URL
references to the servlet in the application. If you have no need of this feature, use the
same name in both places.