« 蛇口沃尔玛电话漂亮的java图片验证码(带字母) »

让Apache Tomcat 6.0支持SSI

1,下载Tomcat6.0.18

2,解压

3,修改Web.xml

tomcat可以以两种方式支持SSI,servlet方式或filter方式,不能同时支持两种。

两种方式的区别:

servlet方式默认只解析后缀为*.shtml的类型

filter方式解析*.shtml类型的同时支持解析任意包含在mime定义中的类型。这类方式可扩展性强,可以支持多种格式。

用户按需配置。山寨博主使用的filter方式,主要将conf/web.xml中433-466行左右处的注释去除,

另外重要的一点,修改conf/context.xml中

<Context>增加privileged属性

<Context privileged="true">

否则Tomcat启动会报错:Filter of class org.apache.catalina.ssi.SSIFilter is privileged and cannot be loaded by this web

此时Tomcat已经支持filter方式的ssi语法了。

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

日历

最新评论及回复

最近发表

Powered By Z-Blog 1.8 Arwen Build 81206

湘 ICP 备 06003756 号
Copyright 山寨 Rights Reserved.