0

从 Richfaces 3、JSF 1.2 迁移到 Richfaces 4、JSF 2 时出现以下错误。我能够成功启动服务器,但是当我点击应用程序时,出现以下错误。

错误

/security/login.jspx (line: 21, column: 88) #{...} is not allowed in template text

viewId=/security/login.jspx

Caused by:
org.apache.jasper.JasperException - /security/login.jspx (line: 21, column: 88) #{...} is not allowed in template text
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)

Login.jspx 标头

<htmlxmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns="http://www.w3.org/1999/html">

控制台输出

SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /security/login.jspx (line: 21, column: 88) #{...} is not allowed in template text
    at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
    at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
    at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:103)
    at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:768)
    at org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1252)
    at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
    at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
    at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:778)
    at org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1252)
    at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
    at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
    at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:778)
    at org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1252)
    at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
    at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
    at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)
    at org.apache.jasper.compiler.Node$Root.accept(Node.java:475)
    at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
    at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1795)
    at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
    at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:369)
    at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:68)
    at org.apache.myfaces.view.jsp.JspViewDeclarationLanguage.buildView(JspViewDeclarationLanguage.java:99)
    at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:78)
    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
    at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:746)
    at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:716)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:65)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
    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:662)
[76135] 30 May 2013 16:16:13 IST    ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/GovernanceVotingApp].[jsp]] Servlet.service() for servlet jsp threw exception 
org.apache.jasper.JasperException: /security/login.jspx (line: 21, column: 88) #{...} is not allowed in template text
    at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:103) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:768) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1252) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:778) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1252) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:778) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1252) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Node$Root.accept(Node.java:475) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1795) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353) [jasper.jar:7.0.39]
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) [jasper.jar:7.0.39]
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646) [jasper.jar:7.0.39]
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357) [jasper.jar:7.0.39]
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) [jasper.jar:7.0.39]
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) [jasper.jar:7.0.39]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) [servlet-api.jar]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) [catalina.jar:7.0.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.39]
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) [catalina.jar:7.0.39]
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487) [catalina.jar:7.0.39]
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412) [catalina.jar:7.0.39]
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339) [catalina.jar:7.0.39]
    at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:369) [myfaces-impl-2.1.11.jar]
    at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:68) [myfaces-api-2.1.11.jar]
    at org.apache.myfaces.view.jsp.JspViewDeclarationLanguage.buildView(JspViewDeclarationLanguage.java:99) [myfaces-impl-2.1.11.jar]
    at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:78) [myfaces-impl-2.1.11.jar]
    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241) [myfaces-impl-2.1.11.jar]
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199) [myfaces-api-2.1.11.jar]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) [catalina.jar:7.0.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.39]
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) [catalina.jar:7.0.39]
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487) [catalina.jar:7.0.39]
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412) [catalina.jar:7.0.39]
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339) [catalina.jar:7.0.39]
    at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:746) [jasper.jar:7.0.39]
    at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:716) [jasper.jar:7.0.39]
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:65)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jasper.jar:7.0.39]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) [servlet-api.jar]
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) [jasper.jar:7.0.39]
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) [jasper.jar:7.0.39]
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) [jasper.jar:7.0.39]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) [servlet-api.jar]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) [catalina.jar:7.0.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.39]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) [catalina.jar:7.0.39]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) [catalina.jar:7.0.39]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) [catalina.jar:7.0.39]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) [catalina.jar:7.0.39]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) [catalina.jar:7.0.39]
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947) [catalina.jar:7.0.39]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) [catalina.jar:7.0.39]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [catalina.jar:7.0.39]
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009) [tomcat-coyote.jar:7.0.39]
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) [tomcat-coyote.jar:7.0.39]
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852) [tomcat-coyote.jar:7.0.39]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [1.6.0_35]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [1.6.0_35]
    at java.lang.Thread.run(Thread.java:662) [1.6.0_35]
4

0 回答 0