You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2007/08/07 04:51:59 UTC
[jira] Updated: (EL-7) [el] Expressions with conditionals and
unprefixed functions do not alway parse
[ https://issues.apache.org/jira/browse/EL-7?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell updated EL-7:
---------------------------
Fix Version/s: 1.1
> [el] Expressions with conditionals and unprefixed functions do not alway parse
> ------------------------------------------------------------------------------
>
> Key: EL-7
> URL: https://issues.apache.org/jira/browse/EL-7
> Project: Commons EL
> Issue Type: Bug
> Environment: Operating System: Windows XP
> Platform: PC
> Reporter: Richard Backhouse
> Fix For: 1.1
>
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.