You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/12/04 14:38:40 UTC
DO NOT REPLY [Bug 32530] New: -
Expressions with conditionals and unprefixed functions do not alway parse
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32530>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32530
Summary: Expressions with conditionals and unprefixed functions
do not alway parse
Product: Commons
Version: unspecified
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: major
Priority: P2
Component: EL
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: backhous@us.ibm.com
If you take a el expression of the form :
${true ? a : reverse("Foo")}
The commons el parser will fail to parse this.
The ambiguity between the Conditional rule and the Function rule (both using ":"
as a token) seems to cause the parser problems.
Here is a jsp that can be used to easily verify this :
<%@page contentType="text/html"%>
<html>
<body>
<%
String expr = "${true ? a : reverse(\"Foo\")}";
try {
pageContext.getExpressionEvaluator().parseExpression(expr,
java.lang.String.class,
null);
out.println("Parsed " + expr);
}
catch (javax.servlet.jsp.el.ELException e) {
out.println("Failed to parsed "+ expr + " : " + e.getMessage());
}
%>
</body>
</html>
Just by adding a prefix to the function or changing the true condition to
something other than a value will make it parse.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org