首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

tomcat7 与tomcat 6 对request.getRequestDispatcher支持不同么 求救指正解决办法

2012-03-23 
tomcat7 与tomcat 6 对request.getRequestDispatcher支持不同么 求救指正该段段程序在tomcat6 下执行正常,

tomcat7 与tomcat 6 对request.getRequestDispatcher支持不同么 求救指正
该段段程序在tomcat6 下执行正常,在tomcat7下报错,请求高手指点迷津!谢谢

程序功能:登陆,取到一个list然后,写入到request中,然后跳转到新的页面在其上显示列表。

登陆验证部分没有问题 ,代码出现在这个servlet中,红色语句出现异常:

Java code
import java.io.IOException;import java.util.ArrayList;import java.util.Collection;import javax.servlet.ServletException;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import com.city.gameroll.bussiness.IGroupBusiness;import com.city.gameroll.factory.BusinessFactory;import com.city.gameroll.value.GroupValue;public class LoginGetGameListAction extends HttpServlet {    public void doGet(HttpServletRequest request, HttpServletResponse response)            throws ServletException, IOException {                IGroupBusiness gb=BusinessFactory.getGroup();        try {            //取得gamelist            Collection<GroupValue> waitGameList = new ArrayList<GroupValue>();            waitGameList=gb.getWaitGameList();            request.setAttribute("waitGameList", waitGameList);//此处出线异常            request.getRequestDispatcher("user/main.jsp").forward(request, response);         } catch (Exception e) {            System.out.println("LoginGetGameListAction出错"+e.getMessage());        }                    }        public void doPost(HttpServletRequest request, HttpServletResponse response)            throws ServletException, IOException {        doGet(request,response);    }}


在tomcat7下运行时,在注释部分抛出异常:
LoginGetGameListAction出错The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
2011-2-15 17:05:05 org.apache.catalina.core.ApplicationDispatcher invoke
严重: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:53)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:310)
at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:152)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:410)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:475)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1425)
at org.apache.jasper.compiler.Parser.parse(Parser.java:138)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:239)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:197)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:365)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:345)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:342)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)


at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
at com.city.gameroll.action.LoginGetGameListAction.doGet(LoginGetGameListAction.java:40)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
at com.city.gameroll.action.LoginGetScoreToRankAction.doGet(LoginGetScoreToRankAction.java:139)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
at com.city.gameroll.action.LoginGetInformationAction.doGet(LoginGetInformationAction.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.city.gameroll.action.EncodingFilter.doFilter(EncodingFilter.java:28)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:284)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:322)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1684)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)


请求解答


[解决办法]
你确认 JSTL 的包在 WEB-INF/lib 中?
------解决方案--------------------


引用
LoginGetGameListAction出错The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

[解决办法]
探讨

main.jsp本来是可以直接访问的,但是已经做了过滤器,不登陆直接访问会跳转到登陆页。

主要是问题是,我的全套程序在tomcat6下运行正常,不会抛出异常。还请各位达人给出更多的建议。

热点排行