Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-7007

JBWEB-208: Failure to evaluate ternary operators in Expression Language(EL)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • TBD EAP 5
    • EAP_EWP 5.1.0
    • Web
    • RHEL 6 Workstation, JBoss EAP 5.1.0

    • Hide

      1. Deploy the attached TestWS.war
      2. Access the application like this
      http://localhost:8080/TestWS

      Show
      1. Deploy the attached TestWS.war 2. Access the application like this http://localhost:8080/TestWS
    • Compatibility/Configuration
    • Medium
    • Hide
      An issue was identified in the Expression Language parser where the evaluation of ternary operators failed, resulting in an error message like the following:
      <code>
      ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/TestWS].[jsp]] (http-127.0.0.1-8080-1) Servlet.service() for servlet jsp threw exception
      org.apache.el.parser.ParseException: Encountered " &lt;ILLEGAL_CHARACTER&gt; "\' "" at line 1, column 16.
      </code>

      The cause of this issue was Failure to evaluate ternary operators in Expression Language (EL). Ternary operators are now correctly evaluated and the issue has been resolved.
      Show
      An issue was identified in the Expression Language parser where the evaluation of ternary operators failed, resulting in an error message like the following: <code> ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/TestWS].[jsp]] (http-127.0.0.1-8080-1) Servlet.service() for servlet jsp threw exception org.apache.el.parser.ParseException: Encountered " &lt;ILLEGAL_CHARACTER&gt; "\' "" at line 1, column 16. </code> The cause of this issue was Failure to evaluate ternary operators in Expression Language (EL). Ternary operators are now correctly evaluated and the issue has been resolved.
    • Documented as Resolved Issue
    • NEW

      This issue is regarding a support case [1] where JBoss throws the below given error while evaluating ternary operators in Expression Language(EL) written in JSP. I found this issue there in EAP 5.1.1 as well but interestingly this issue does not occur in EAP 4.3.x .
      I have attached a sample test case, which once you deploy and hit the application like this (http://localhost:8080/TestWS) it throws the following ERROR.

      2011-07-27 12:34:51,197 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/TestWS].[jsp]] (http-127.0.0.1-8080-1) Servlet.service() for servlet jsp threw exception
      org.apache.el.parser.ParseException: Encountered " <ILLEGAL_CHARACTER> "\' "" at line 1, column 16.
      Was expecting one of:
      <INTEGER_LITERAL> ...
      <FLOATING_POINT_LITERAL> ...
      <STRING_LITERAL> ...
      "true" ...
      "false" ...
      "null" ...
      "(" ...
      ")" ...
      "!" ...
      "not" ...
      "empty" ...
      "-" ...
      <IDENTIFIER> ...

      at org.apache.el.parser.ELParser.generateParseException(ELParser.java:2142)
      at org.apache.el.parser.ELParser.jj_consume_token(ELParser.java:2024)
      ......

      As per the bug opened for the same issue faced in Apache Tomcat, as mentioned in the following URL [2], the issue has been fixed and the fix has been included in Apache Tomcat version 6.0.23 onwards.
      There exists a JIRA [3] where for similar issue we are rebasing to Version 6.0.21 , hence I am opening this fresh JIRA so that a patch could be provided for the existing users of EAP 5.x and also this change could be included into EAP 5.1.2 as well.

      [1] https://c.na7.visual.force.com/apex/Case_View?id=500A0000007BrQwIAK&sfdc.override=1
      [2] https://issues.apache.org/bugzilla/show_bug.cgi?id=48112
      [3] https://issues.jboss.org/browse/JBPAPP-6382

              rhn-engineering-jclere Jean-Frederic Clere
              rhn-support-mhussain Musharraf Hussain
              Russell Dickenson Russell Dickenson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: