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 2011/04/22 15:57:36 UTC

DO NOT REPLY [Bug 51108] New: The identifier [new] is not a valid Java identifier

https://issues.apache.org/bugzilla/show_bug.cgi?id=51108

           Summary: The identifier [new] is not a valid Java identifier
           Product: Tomcat 7
           Version: 7.0.11
          Platform: PC
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Jasper
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: tilman@snafu.de


This JSP code that worked fine with Tomcat 6 is no longer valid in the Tomcat 7
version that comes bundled with Netbeans 7:

${pageContext.session.new}

javax.el.ELException: The identifier [new] is not a valid Java identifier as
required by section 1.19 of the EL specification (Identifier ::= Java language
identifier). This check can be disabled by setting the system property
org.apache.el.parser.SKIP_IDENTIFIER_CHECK to true.

After reading Bug 50147, I've understood what this is about. However, I think
that you're biting yourself - using ".new" like I did isn't about some
developer who made a poor choice with a function name, it is the EL version of
using a standard library call: <%=pageContext.getSession().isNew()%> .

I suspect that sooner or later, every JSP user (and possibly also JSF and
Spring users if it happens there too) with Tomcat 7 will have to enable this
SKIP_IDENTIFIER_CHECK property, so setting this property to "false" by default
isn't really the best idea you ever had.

So my suggestion is to set it to true by default again, maybe for Tomcat 8 :-)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 51108] The identifier [new] is not a valid Java identifier

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

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE
         OS/Version|                            |All

--- Comment #1 from Konstantin Kolinko <kn...@gmail.com> 2011-04-22 11:07:39 EDT ---
Just write your code as ${pageContext.session['new']}

The default will not be changed, because of specification compliance.

*** This bug has been marked as a duplicate of bug 50147 ***

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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