[ 
https://issues.apache.org/jira/browse/EL-7?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521049
 ] 

Henri Yandell commented on EL-7:
--------------------------------

Anyone have any thoughts on this? 

I'm thinking that this is a general problem with the spec, and that any 
solution is going to be horrible. Something to report to the spec group and 
mark as wontfix?

> [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
>
>         Attachments: EL-7.patch
>
>
> 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 :
> <[EMAIL PROTECTED] 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.

Reply via email to