users@glassfish.java.net

Moving from GlassFish V3 to JBoss AS7: JasperException "#{..} is not allowed

From: <forums_at_java.net>
Date: Sun, 4 Nov 2012 08:54:17 -0600 (CST)

I'm moving a JEE application from GlassFish V3 to JBoss AS 7. First problem I
had was that init() and destroy() methods of my JSF managed beans were not
been invoked. I added @PostConstruct and @PreDestroy annotations to those
methods and that solved the problem. Just out of curiosity, I did the same
thing in my GlassFish platform and both init() and destroy() methods were
executed twice. Now I'm stuck with a JasperException. JSP pages are not
rendered. I'm getting a JasperException that says "#{..} is not allowed in
template text". I googled it and I came up with a bunch of recommendations to
move to Facelets. The application is using old-style jsp files with woodsotck
visual components. Given the project deadline, moving it to Facelets doesn't
seem feasible. My GlassFish V3 platform has Mojarra 2.1.6 and my JBoss AS 7
platform has Mojarra 2.1.7. So far I haven't been able to determine the
reason for all these problems. I hope someone can point me in the right
direction. This is the exception (you will find the jsp file, the web.xml
file and the faces-config.xml file after the exception):
org.apache.jasper.JasperException: /Menu.jsp(6,59) #{..} is not allowed in
template text at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:102)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:756)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1246)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:881)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:518)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Node$JspRoot.accept(Node.java:584)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2433)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Node$Root.accept(Node.java:495)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1793)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:211)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:360)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:607)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
[jbossweb-7.0.13.Final.jar:] at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
[jbossweb-7.0.13.Final.jar:] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
[jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
[jbossweb-7.0.13.Final.jar:] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.13.Final.jar:] at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:840)
[jbossweb-7.0.13.Final.jar:] at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:622)
[jbossweb-7.0.13.Final.jar:] at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:560)
[jbossweb-7.0.13.Final.jar:] at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:488)
[jbossweb-7.0.13.Final.jar:] at
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:546)
[jsf-impl-2.1.7-jbossorg-2.jar:] ... 28 more This is the jsp file: <?xml
version="1.0" encoding="UTF-8"?> This is the web.xml file: <?xml
version="1.0" encoding="UTF-8"?> javax.faces.STATE_SAVING_METHOD server
com.sun.faces.numberOfLogicalViews 45 com.sun.faces.numberOfViewsInSession 45
com.sun.faces.validateXml true com.sun.faces.verifyObjects false UploadFilter
com.sun.webui.jsf.util.UploadFilter The maximum allowed upload size in bytes.
If this is set to a negative value, there is no maximum. The default value is
1000000. maxSize 2000000 The size (in bytes) of an uploaded file which, if it
is exceeded, will cause the file to be written directly to disk instead of
stored in memory. Files smaller than or equal to this size will be stored in
memory. The default value is 4096. sizeThreshold 4096 UploadFilter Faces
Servlet Faces Servlet javax.faces.webapp.FacesServlet
javax.faces.LIFECYCLE_ID com.sun.faces.lifecycle.PARTIAL 1
ExceptionHandlerServlet com.sun.errorhandler.ExceptionHandler errorHost
localhost errorPort 24444 ThemeServlet com.sun.webui.theme.ThemeServlet Faces
Servlet /faces/* ExceptionHandlerServlet /error/ExceptionHandler ThemeServlet
/theme/* 30 index.jsp javax.servlet.ServletException /error/ExceptionHandler
java.io.IOException /error/ExceptionHandler javax.faces.FacesException
/error/ExceptionHandler com.sun.rave.web.ui.appbase.ApplicationException
/error/ExceptionHandler *.jspf true Area Publica Hojas de Estilo, Imagenes,
etc /resources/* Area Privada Gestion del Programa de Pension Alimentaria /*
SuperGestor SuperLector Operador FORM /login.jsp /error.jsp FacadeBeanLocator
EJB Local Reference ejb/FacadeBeanLocator Session
com.egt.ejb.persistence.FacadeBeanLocatorLocal
mhzap201-ejb-persistence.jar#FacadeBeanLocatorBean Visual Web generated
DataSource Reference jdbc/mhzap201 javax.sql.DataSource Container This is the
faces-config.xml file: <?xml version='1.0' encoding='UTF-8'?>
com.egt.web.Bundle bundle ApplicationBean1 com.egt.web.ApplicationBean1
application SessionBean1 com.egt.web.SessionBean1 session RequestBean1
com.egt.web.RequestBean1 request FragmentoCabeza1
com.egt.web.FragmentoCabeza1 request FragmentoCabeza2
com.egt.web.FragmentoCabeza2 request FragmentoCabeza2A
com.egt.web.FragmentoCabeza2A request FragmentoCabeza2I
com.egt.web.FragmentoCabeza2I request FragmentoCabeza2M
com.egt.web.FragmentoCabeza2M request FragmentoCabeza2P
com.egt.web.FragmentoCabeza2P request FragmentoCabeza3
com.egt.web.FragmentoCabeza3 request FragmentoColumnaIzquierda
com.egt.web.FragmentoColumnaIzquierda request FragmentoDetalle
com.egt.web.FragmentoDetalle request FragmentoFiltro
com.egt.web.FragmentoFiltro request FragmentoFiltro_1
com.egt.web.FragmentoFiltro_1 request FragmentoJoin com.egt.web.FragmentoJoin
request FragmentoMenuVertical com.egt.web.FragmentoMenuVertical request
FragmentoPie1 com.egt.web.FragmentoPie1 request FragmentoPie2
com.egt.web.FragmentoPie2 request FragmentoPie3 com.egt.web.FragmentoPie3
request Ayuda com.egt.web.Ayuda request Inicio com.egt.web.Inicio request
Menu com.egt.web.Menu request Favoritos com.egt.web.Favoritos request
Password com.egt.web.Password request

--
[Message sent by forum member 'jrcampins']
View Post: http://forums.java.net/node/891969