Tomcat7开启SSI功能
1.官方参考文档地址:
2.配置步骤
(1)修改tomcat根目录下的conf文件夹中的context.xml,修改如下:
- <Context privileged="true">
- <!-- Default set of monitored resources -->
- <WatchedResource>WEB-INF/web.xml</WatchedResource>
- </Context>
(2)修改tomcat根目录下的conf文件夹中的web.xml,将SSI的Servlet的配置取消注释,并增加编码配置,否则可能出现乱码
- <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>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>
- <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>false</param-value>
- </init-param>
- <load-on-startup>4</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>ssi</servlet-name>
- <url-pattern>*.shtml</url-pattern>
- <url-pattern>*.html</url-pattern>
- </servlet-mapping>
相关推荐
pigsmall 2020-11-19
SXIAOYI 2020-09-16
linuxprobe0 2013-04-01
83560193 2013-06-25
kidneybeans 2013-06-17
加菲猫园 2013-06-16
年轻就要对味 2014-07-11
稻草人的高粱地 2014-07-02
smilebestSun 2014-06-12
xusong 2014-05-17
zfszhangyuan 2013-09-12
80183053 2013-09-12
gaozhlzh 2013-09-11
87453169 2014-01-17
Tom天天 2013-07-12
Ladyseven 2020-07-25
whileinsist 2020-06-24
gufudhn 2020-06-12