Tomcat supports SSI feature configuration

Source: Internet
Author: User

1.SSI is the abbreviation for Server Side includes, which is a set of instructions embedded in an HTML page. Upon returning the requested page (before the SSI Directive), the server processes the instructions, replaces the instructions with the processed results, and returns the page. This allows dynamically generated content to be added to the HTML page.

2. Configuration: Tomcat6

Open commented-out SSI servlet and servlet-mapping in Web. XML under the Conf package

<servlet>        <Servlet-name>Ssi</Servlet-name>        <Servlet-class>Org.apache.catalina.ssi.SSIServlet</Servlet-class>        <Init-param>          <Param-name>Buffered</Param-name>          <Param-value>1</Param-value>        </Init-param>        <Init-param>          <Param-name>Debug</Param-name>          <Param-value>0</Param-value>        </Init-param>        <Init-param>          <Param-name>Expires</Param-name>          <Param-value>666</Param-value>        </Init-param>        <Init-param>          <Param-name>Isvirtualwebapprelative</Param-name>          <Param-value>0</Param-value>        </Init-param>        <Load-on-startup>4</Load-on-startup>    </servlet> <servlet-mapping>        <Servlet-name>Ssi</Servlet-name>        <Url-pattern>*.shtml</Url-pattern>    </servlet-mapping>

Add a configuration under the Conf package context.xml

<= "true">

The page display garbled solution is added in the SSI servlet configuration under the Conf package in Web. xml:

Note: The utf-8 should be the same as the page encoding

<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> 

Introduction File Mode:

<!---<!-- -

This article references: http://www.codesky.net/article/201107/148798.html

Tomcat supports SSI feature configuration

Related Article

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.