To enable SSI (server-side includes) processing for a specific web module, add the SSIServlet to your web.xml file as follows:
<web-app> <servlet> <servlet-name>ssi</servlet-name> <servlet-class>org.apache.catalina.ssi.SSIServlet</servlet-class> </servlet> ... <servlet-mapping> <servlet-name>ssi</servlet-name> <url-pattern>*.shtml</url-pattern> </servlet-mapping> ... <mime-mapping> <extension>shtml</extension> <mime-type>text/html</mime-type> </mime-mapping> </web-app>
To enable SSI processing for all web modules, un-comment the corresponding sections in the default-web.xml file.
If the mime-mapping is not specified in web.xml, Enterprise Server attempts to determine the MIME type from default-web.xml or the operating system default.
You can configure the following init-param values for the SSIServlet.
Table 7–2 SSIServlet init-param Values
init-param |
Type |
Default |
Description |
---|---|---|---|
buffered |
boolean |
false |
Specifies whether the output should be buffered. |
debug |
int |
0 (for no debugging) |
Specifies the debugging level. |
expires |
Long |
Expires header in HTTP response not set |
Specifies the expiration time in seconds. |
inputEncoding |
String |
operating system encoding |
Specifies encoding for the SSI input if there is no URL content encoding specified. |
isVirtualWebappRelative |
boolean |
false (relative to the given SSI file) |
Specifies whether the virtual path of the #include directive is relative to the content-root. |
outputEncoding |
String |
UTF-8 |
Specifies encoding for the SSI output. |
For more information about SSI, see http://httpd.apache.org/docs/2.2/mod/mod_include.html.