From http://topic.csdn.net/u/20080131/10/5aa34d03-92f2-41ca-adf1-b97e61218705.html
In current tomcat, shtml is not supported by default and requires certain configuration. In fact, it is not very complicated. Different Tomcat versions have different configuration methods. The reference method is as follows:
Tomcat5.x configuration method:
1. Find the servlets-ssi.renametojar file in the $ catalina_base/Server/lib/directory and rename it to the servlets-ssi.jar
2. Find the Web. xml file in the $ catalina_base/CONF/directory.
3. Delete the comments around SSI Servlet and servlet-mapping using SSI servlet, and delete the comments around SSI filter and filter-mapping using SSI filter.
The configuration of Tomcat 6 SSI is different from that of 5.x. The following describes how to configure Tomcat 6 ssi.
How to configure Tomcat 6:
1. Find the Web. xml file in the $ catalina_base/CONF/directory.
2. Delete the comments around SSI Servlet and servlet-mapping using SSI servlet, and delete the comments around SSI filter and filter-mapping using SSI filter.
3. $ catalina_base/CONF/has a context. xml file. Change <context> to <context privileged = "true">
4. Solve the garbled Problem
Add the following initial configuration to the SSI servlet configuration in $ catalina_base/CONF/Web. xml:
<Init-param>
<Param-Name> inputencoding </param-Name>
<Param-value> UTF-8 </param-value>
</Init-param>
<Init-param>
<Param-Name> outputencoding </param-Name>
<Param-value> UTF-8 </param-value>
</Init-param>
The UTF-8 encoding should be the same as the page encoding method.
For more information, see Official configuration instructions http://tomcat.apache.org/tomcat-6.0-doc/ssi-howto.html
The configuration above contains the following files:
<! -- # Include file = "include.html" -->
<! -- # Include virtual = "include.html" -->
Can be displayed normally.