Servlet + of + class + org. Apache. Catalina. ssi. SSIServlet + is + privileged + and + cannot + be + loaded + by + This + Web +

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.