在网上搜,看见这篇文章,但一直没有人给出解决办法..实在找不到发这篇文章的作者,所以在这里再发一次...希望大家帮我解决一下...非常感谢!!!web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
..................
<filter>
<filter-name>CacheFilter</filter-name>
<filter-class>com.opensymphony.oscache.web.filter.CacheFilter</filter-class>
<init-param>
<param-name>time</param-name>
<param-value>100</param-value>
</init-param>
<init-param>
<param-name>scope</param-name>
<param-value>session</param-value>
</init-param>
</filter> <filter-mapping>
<filter-name>CacheFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<taglib>
<taglib-uri>oscache</taglib-uri>
<taglib-location>/WEB-INF/classes/oscache.tld</taglib-location>
</taglib>
</web-app>结果在unix服务器上提示::::Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
PARSE error at line 46 column -1
org.xml.sax.SAXParseException: 组件“web-app”在此不允许“filter”。
Starting service Tomcat-Apache
Apache Tomcat/4.0.6这是怎么回事情?
还有一种在页面上处理的方式,我也没有成功.<%@ taglib uri="oscache" prefix="cache" %>
<cache:cache time="60">
<HTML>
<HEAD>
............
</HEAD>
<%
List dataInfo = (List)env_Session.getFundData2List(" 1=1 ");
....
%>
<BODY>
............
</BODY>
</html></cache:cache>这样子也不行,连页面也打不开.以上均在window下成功,但是在 oscache 这2种使用方式在 unix全部行不通.why ?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
..................
<filter>
<filter-name>CacheFilter</filter-name>
<filter-class>com.opensymphony.oscache.web.filter.CacheFilter</filter-class>
<init-param>
<param-name>time</param-name>
<param-value>100</param-value>
</init-param>
<init-param>
<param-name>scope</param-name>
<param-value>session</param-value>
</init-param>
</filter> <filter-mapping>
<filter-name>CacheFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<taglib>
<taglib-uri>oscache</taglib-uri>
<taglib-location>/WEB-INF/classes/oscache.tld</taglib-location>
</taglib>
</web-app>结果在unix服务器上提示::::Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
PARSE error at line 46 column -1
org.xml.sax.SAXParseException: 组件“web-app”在此不允许“filter”。
Starting service Tomcat-Apache
Apache Tomcat/4.0.6这是怎么回事情?
还有一种在页面上处理的方式,我也没有成功.<%@ taglib uri="oscache" prefix="cache" %>
<cache:cache time="60">
<HTML>
<HEAD>
............
</HEAD>
<%
List dataInfo = (List)env_Session.getFundData2List(" 1=1 ");
....
%>
<BODY>
............
</BODY>
</html></cache:cache>这样子也不行,连页面也打不开.以上均在window下成功,但是在 oscache 这2种使用方式在 unix全部行不通.why ?
think in java 各章后练习答案.....
http://blog.csdn.net/heimaoxiaozi/
http://blog.xerik.cn (专注于Java技术)