[jboss-jira] [JBoss JIRA] (WFLY-4455) JSP function lookup is broken if EL expression contains map or set literal

Tomaz Cerar (JIRA) issues at jboss.org
Wed Jun 3 09:41:03 EDT 2015


     [ https://issues.jboss.org/browse/WFLY-4455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tomaz Cerar resolved WFLY-4455.
-------------------------------
    Fix Version/s: 10.0.0.Alpha3
                       (was: 10.0.0.Alpha4)
       Resolution: Done


Fix is part of Jastow 2.0 which was merged into master.

> JSP function lookup is broken if EL expression contains map or set literal
> --------------------------------------------------------------------------
>
>                 Key: WFLY-4455
>                 URL: https://issues.jboss.org/browse/WFLY-4455
>             Project: WildFly
>          Issue Type: Bug
>    Affects Versions: 8.2.0.Final
>            Reporter: Paul Pogonyshev
>            Assignee: Tomaz Cerar
>              Labels: el, jsp, taglib
>             Fix For: 10.0.0.Alpha3
>
>         Attachments: jsp-bug.war, jsp-bug.war
>
>
> The attached trivial applications consists of 'test.jsp' and 'WEB-INF/bug.tld' files. The latter includes only one function mapped from the standard Java library. It is not relevant what it does, only that it is mapped. File 'test.jsp' contains this expession:
>     ${{}; bug:dummy()}
> Please note that without '{};' (if it is removed or e.g. replaced with '1;) it works correctly, printing something like 'java.lang.Runtime at ...'. (In my real application this is 'my:function1 ({ x: y }) && my:function2 (...)'. Lookup of the first function succeeds, but lookup of the second one fails. If I replace map literal with something else, expression is compiled just fine.)
> However, if expression contains set (or map) literal, JSP compiler fails with this exception:
> {noformat}
> 15:05:24,317 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /jsp-bug/test.jsp: org.apache.jasper.JasperException: JBWEB004038: An exception occurred processing JSP page /test.jsp at line 7
> 4:   </head>
> 5: 
> 6:   <body>
> 7:     ${{}; bug:dummy()}
> 8:   </body>
> 9: </html>
> Stacktrace:
>         at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:494) [jastow-1.0.0.Final.jar:1.0.0.Final]
>         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:408) [jastow-1.0.0.Final.jar:1.0.0.Final]
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jastow-1.0.0.Final.jar:1.0.0.Final]
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259) [jastow-1.0.0.Final.jar:1.0.0.Final]
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
>         at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
>         at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
>         at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
>         at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
>         at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
>         at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]
>         at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]
> Caused by: java.lang.NullPointerException
>         at org.apache.jasper.el.FunctionMapperImpl.resolveFunction(FunctionMapperImpl.java:32) [jastow-1.0.0.Final.jar:1.0.0.Final]
>         at com.sun.el.lang.FunctionMapperFactory.resolveFunction(FunctionMapperFactory.java:71) [javax.el-3.0.1-b05.jar:]
>         at com.sun.el.lang.ExpressionBuilder.visit(ExpressionBuilder.java:272) [javax.el-3.0.1-b05.jar:]
>         at com.sun.el.parser.SimpleNode.accept(SimpleNode.java:172) [javax.el-3.0.1-b05.jar:]
>         at com.sun.el.parser.SimpleNode.accept(SimpleNode.java:175) [javax.el-3.0.1-b05.jar:]
>         at com.sun.el.lang.ExpressionBuilder.prepare(ExpressionBuilder.java:227) [javax.el-3.0.1-b05.jar:]
>         at com.sun.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:238) [javax.el-3.0.1-b05.jar:]
>         at com.sun.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:295) [javax.el-3.0.1-b05.jar:]
>         at com.sun.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:112) [javax.el-3.0.1-b05.jar:]
>         at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:897) [jastow-1.0.0.Final.jar:1.0.0.Final]
>         at org.apache.jsp.test_jsp._jspService(test_jsp.java:61)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:69) [jastow-1.0.0.Final.jar:1.0.0.Final]
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
>         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:366) [jastow-1.0.0.Final.jar:1.0.0.Final]
>         ... 29 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list