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: [email protected]
Reporter: [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]