You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2019/05/06 15:21:20 UTC

[Bug 63407] New: EL Compiler can not compile when the EL contains a java reserved word

https://bz.apache.org/bugzilla/show_bug.cgi?id=63407

            Bug ID: 63407
           Summary: EL Compiler can not compile when the EL contains a
                    java reserved word
           Product: Tomcat 7
           Version: 7.0.94
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: pashazadeh@gmail.com
  Target Milestone: ---

We have class in our project with a accessor method with signature of

  public boolean isFloat() {}

when referencing this method in JSP ELs (having something like ${abean.float}),
JSP compiler throws an error during compilation of the JSP.

There was no such a problem in Tomcat 6.x but, Tomcat 7.x and Tomcat 8.5.x have
the same problem and can not compile the JSP when it contains float as a part
of EL path.

As a workaround I renamed the method to something else.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 63407] EL Compiler can not compile when the EL contains a java reserved word

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63407

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 OS|                            |All
         Resolution|---                         |INVALID

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
From the EL 2.2 specification:

Identifier ::= Java language identifier

float is not a valid Java identifier because it is a reserved word in Java.

The same constraint was present in the EL 2.1 specification but Tomcat 6 was
not as strict.

In 7.0.x onwards you can disable this additional check using:
-Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=false

although the right thing to do would be to fix the app.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org