JSF和tomcat5 - 无渲染响应

时间:2011-01-29 15:32:28

标签: java jsf tomcat el

有一位开发人员为我的公司编写了一个JSF应用程序。他在tomcat 6上写道,不幸的是我不得不把所有东西都转移到tomcat 5.我放了几个丢失的罐子,最后能够执行一个请求。但是在RenderResponse阶段,我得到以下内容:

  

2011年1月29日下午8:41:51   com.sun.faces.lifecycle.ELResolverInitPhaseListener   popu lateFacesELResolverForJsp INFO:   JSF1027:[null] ELResolvers for   JSF未在JSP中注册   容器。 2011年1月29日下午8:41:54   com.sun.faces.lifecycle.LifecycleImpl   阶段警告:   executePhase(RENDER_RESPONSE   6,com.sun.faces.context.FacesContextImpl @ c8570c)   扔了例外   com.sun.rave.web.ui.appbase.ApplicationException:   javax.servlet.ServletException:   使用javax / servlet的/ JSP / tagext / JspIdConsumer           at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:594)           at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:325)           在com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)           在com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)           在com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)           在javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)           在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)           在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)           在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)           在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)           在org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)           在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)           在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)           在org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)           at org.apache.coyote.http11.Http11BaseProtocol $ Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)           在org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)           在org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)           at org.apache.tomcat.util.threads.ThreadPool $ ControlRunnable.run(ThreadPool.java:689)           在java.lang.Thread.run(Thread.java:619)   引起:javax.faces.FacesException:   javax.servlet.ServletException:   使用javax / servlet的/ JSP / tagext / JspIdConsumer           at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:413)           at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:439)           at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:114)           at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320)           ... 19更多引起:javax.servlet.ServletException:   使用javax / servlet的/ JSP / tagext / JspIdConsumer           在org.apache.jasper.servlet.JspServlet.service(JspServlet.java:273)           在javax.servlet.http.HttpServlet.service(HttpServlet.java:729)           在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)           在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)           at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)           at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)           在org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)           在org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)           at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)           ... 22更多2011年1月29日下午8:41:54   com.sun.faces.lifecycle.LifecycleImpl   阶段警告:阶段(RENDER_RESPONSE   6,com.sun.faces.context.FacesContextImpl @ c8570c)   抛出异常:   com.sun.rave.web.ui.appbase.ApplicationException:   javax.servlet.ServletException:   使用javax / servlet的/ JSP / tagext / JspIdConsumer   javax.servlet.ServletException:   使用javax / servlet的/ JSP / tagext / JspIdConsumer   com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:594)   com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:470)   com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)   com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)   com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)   javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)   org.apache.coyote.http11.Http11BaseProtocol $ Http11ConnectionHandler.processConne   ction(Http11BaseProtocol.java:665)   org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)   org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)   org.apache.tomcat.util.threads.ThreadPool $ ControlRunnable.run(ThreadPool.java:689)   java.lang.Thread.run(Thread.java:619)

有人可以告诉我这意味着什么,我该如何解决?我正在研究这个问题,但尚未得到解决方案。是因为罐子的版本错误吗?

非常感谢

1 个答案:

答案 0 :(得分:0)

如果您正在使用JSF 1.2,那么请确保您使用的是Tomcat 5.5,并且您的web.xml被声明为Servlet 2.4(因此不是2.3或更旧版本的旧版DOCTYPE )。

<?xml version="1.0" encoding="UTF-8"?>
<web-app
    xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

    <!-- Config here. -->

</web-app>

表达式语言(EL)是在JSP 2.0中引入的,它是Servlet 2.4的一部分。该异常表示它被声明为Servlet 2.3或更早版本。

如果您正在使用JSF 1.1,那么您应该能够在Tomcat 5.0上使用Servlet 2.3声明web.xml运行它(您只需要将JSF 1.2降级为JSF 1.1)。但是,如果您使用的是JSF 2.0,则需要Tomcat 6.0或更新版本的Servlet 2.5声明为web.xml