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语法了。