NonStop Servlets for JavaServer Pages (NSJSP) 6.1 System Administrator's Guide
Configuring NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) 6.1 System Administrator’s Guide—596210-006
3-71
The web.xml File
Static Content Filter
This filter should be enabled when user applications are configured with a Persistent
Manager and the SessionBasedLoadBalancing parameter in the
servlet.config file is set to false, and the application needs to return static
content. The use of the filter in that case, will eliminate some unnecessary session-
related database operations.
In the default configuration, the static content filter configuration is provided in the
<NSJSP_HOME>/conf/web.xml deployment descriptor, but it is commented out. As
an alternative, the filter can also be defined in application specific deployment
descriptors.
All static content, such as image files, static html pages and so on need to be mapped
to this filter using the filter-mapping element in the web.xml file.
The use of the mapping the filter-mapping element by the Persistent Manager is
explained below:
When NSJSP is configured for disk-based sessions, the session object is swapped out
of memory after each request is processed. However, the session object is persisted to
the session store in a database table. When only static resources are returned to the
remote client by NSJSP, persisting the entire session object is unnecessary as the
session object does not change during static resource processing. The static content
filter is used to indicate to the Persistent Manager that the request being serviced is for
static content. When the static content filter is enabled, the persistent manager does
Example 3-57. Configuration of the CGI processing Servlet
<!--
<servlet>
<servlet-name>cgi</servlet-name>
<servlet-class>org.apache.catalina.servlets.CGIServlet
</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>cgiPathPrefix</param-name>
<param-value>WEB-INF/cgi</param-value>
</init-param>
<load-on-startup>5</load-on-startup>
</servlet>
-->
.
.
.
<!--
<servlet-mapping>
<servlet-name>cgi</servlet-name>
<url-pattern>/cgi-bin/*</url-pattern>
</servlet-mapping>
-->










