tomcat 6 SSI 配置问题的解决
2009-12-25 16:47
423 查看
你也可能遇到了:java.lang.SecurityException: Filter of class org.apache.catalina.ssi.SSIFilter is privileged and cannot be loaded by this web application
tomcat 6 SSI的配置与5.x版本不同,从网上搜索的结果来看,5.xx中要改一个.jar中的文件,而6.x中,却没有这个文件
1.首先想到的还是看官方文档http://tomcat.apache.org/tomcat-6.0-doc/ssi-howto.html,文档里说得很清楚:只需把
2 启动,出错,报了一个安全方面的异常,
java.lang.SecurityException: Filter of class org.apache.catalina.ssi.SSIFilter is privileged and cannot be loaded by this web application再看文档还有这样一句话:Only Contexts which are marked as privileged may use SSI features (see the privileged property of the Context element).
我对privileged property of the Context element的理解有误,先是把
3.我使用的版本 6.0.13中
tomcat 6 SSI的配置与5.x版本不同,从网上搜索的结果来看,5.xx中要改一个.jar中的文件,而6.x中,却没有这个文件
1.首先想到的还是看官方文档http://tomcat.apache.org/tomcat-6.0-doc/ssi-howto.html,文档里说得很清楚:只需把
$CATALINA_BASE/conf/web.xml文件里ssi 相关的 servlet servlet-mapping filter filter-mapping注释去掉就行
2 启动,出错,报了一个安全方面的异常,
java.lang.SecurityException: Filter of class org.apache.catalina.ssi.SSIFilter is privileged and cannot be loaded by this web application再看文档还有这样一句话:Only Contexts which are marked as privileged may use SSI features (see the privileged property of the Context element).
我对privileged property of the Context element的理解有误,先是把
$CATALINA_BASE/conf/servlet.xml下的当前项目的 Context中加入了privileged="true"的属性(这不正是Context元素的 privileged 属性吗),启动还是报错.无奈,崩溃中.......
3.我使用的版本 6.0.13中
$CATALINA_BASE/conf/下还有一个context.xml 这里面也有一个context的元素, 加上 privileged="true" 属性后,再启动,这次启动成功了 补充:以上的配置并没有解决乱码问题 乱码的解决:在
$CATALINA_BASE/conf/web.xml中的ssi servlet配置中添加以下初始配置:
<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> 其中
utf-8应该与你页面的编码方式相同
在shtml页面里
<!--#include file="test.html"-->就可以引用静态文件了
相关文章推荐
- tomcat 6 SSI 配置问题的解决
- Tomcat7下配置SSI(解决中文乱码问题)
- Tomcat7下配置SSI(解决中文乱码问题)
- 解决在Eclipse中配置JBoss、Tomcat等插件时遇到的问题
- tomcat解决中文乱码问题及tomcat的配置
- @maohoo Spring boot 配置Tomcat 根目录,解决web资源目录找不到的问题
- 解决Linux下ArcGIS Server的Tomcat不稳定问题,nginx配置反向代理时的一个小问题
- 更改Tomcat配置,解决中文乱码问题
- Tomcat 配置多个WEB应用的问题解决办法
- tomcat服务器配置字符集为utf-8-彻底解决中文乱码问题
- IBatis配置tomcat的JNDI问题解决Cannot create JDBC driver of class '' for connect URL 'null'
- JavaBug库____tomcat配置解决中文乱码问题
- nginx配置支持ssi不起作用问题解决办法
- Tomcat的配置及出现问题的解决方法
- Java Web入门学习(四)Eclipse与Maven、Tomcat整合配置 (重整版并解决问题)
- tomcat配置文件解决乱码问题
- Tomcat的配置及常见问题解决
- Tomcat 配置教程及问题解决小记
- Struts / Tomcat 配置连接池错误解决问题及实例
- nginx配置tomcat https websockets等问题汇总解决方式