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-13
jdbc.config
Initializing Servlets
You can 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 which 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 the initialization parameter
of the servlet, as shown in Example 3-9.
As noted previously, the servlet name is an alias of the servlet class name. The alias
allows you to change the name of the servlet class without having to make changes to
URL references in the servlet in the application. If you do not need this feature, use the
same name in both places.
jdbc.config
The jdbc.config file contains JDBC specific configuration including the locations of
the JDBC/MX and JDBC/MP installations. The JDBC/MX and JDBC/MP installations
used are either the default values or then what was specified when the setup script
was run. Based on the existence of the JDBC/MX and JDBC/MP jar files
(jdbcMx.jar and sqlmp.jar), the classpath is also setup to contain the jar files.
filemaps.config
For each new application (a collection of related servlets, JSP and other resources)
you may need to add a corresponding filemap in the filemaps.config file.
For example, a new application called orders could be accessed while the default path
is /servlet_jsp/orders or by adding the following filemap.
Filemap /orders $server_objectcode
Example 3-9. Initializing Servlets
<servlet>
<servlet-name>your alias servlet name</servlet-name>
<servlet-class>your servlet class 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>
<servlet-mapping>
<servlet-name>your alias servlet name</servlet-name>
<url-pattern>your URL pattern map</url-pattern>
</servlet-mapping>