You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/02/25 08:24:55 UTC
[Bug 56185] New: Jasper to compile compile complicated EL expression
https://issues.apache.org/bugzilla/show_bug.cgi?id=56185
Bug ID: 56185
Summary: Jasper to compile compile complicated EL expression
Product: Tomcat 8
Version: 8.0.3
Hardware: PC
Status: NEW
Severity: regression
Priority: P2
Component: EL
Assignee: dev@tomcat.apache.org
Reporter: serge.pak@gmail.com
The following jsp fails to compile:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:useBean id="myBean" scope="request" class="com.MyBean"/>
<c:if test="${(myBean.int1 > 1 and myBean.myBool) or ((myBean.myBool or
myBean.myBool1) and myBean.int1 > 1)}">Hello world</c:if>
If I simplify test expression to: (myBean.int1 > 1 and myBean.myBool) or
(myBean.myBool and myBean.int1 > 1) i.e. replace (myBean.myBool or
myBean.myBool1) with myBean.myBool, then compilation will work.
It looks like Jasper cannot compile EL expressions with depth that is higher
than a certain value (4?)
Exception as follows
org.apache.jasper.JasperException: /testCompile.jsp (line: 26, column: 0)
"${(myBean.int1 > 1 and myBean.myBool) or ((myBean.myBool or myBean.myBool) and
myBean.int1 > 1)}" contains invalid expression(s): javax.el.ELException: Failed
to parse the expression [${(myBean.int1 > 1 and myBean.myBool) or
((myBean.myBool or myBean.myBool) and myBean.int1 > 1)}]
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:276)
.....
Works properly in Tomcat 6 and Tomcat 7.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 56185] Jasper to compile compile complicated EL expression
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56185
Konstantin Kolinko <kn...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
OS| |All
--- Comment #1 from Konstantin Kolinko <kn...@gmail.com> ---
It is reproducible in 8.0.3, but not in the current trunk.
So I think that it was fixed with bug 56179 - r1571242 and r1571245
To reproduce I put the text from Description as examples/test.jsp with
s/class="com.MyBean"/class="cal.TableBean"/
In 8.0.3 it fails at compile time with "contains invalid expression(s)".
In current trunk it compiles successfully and fails at runtime (trying to
access a property that "cal.TableBean" does not have).
Closing as duplicate.
*** This bug has been marked as a duplicate of bug 56179 ***
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org