It is confusing that com.sun.el, (being the reference implementation?) breaks the spec by not validating identifiers.
The result is that JSP code that is tested/developed on com.sun.el fails when run on Tomcat 7.
I suggest that com.sun.el adds validation of identifiers. Preferably, this should be configurable similar to Jasper's org.apache.el.parser. SKIP_IDENTIFIER_CHECK system property.
For reference, here's Tomcat's implementation of the validation logic:
Tomcat 7 refuses usage of Java Identifiers as per JLS to be used as identifiers in EL expressions.
As seen in this discussion https://issues.apache.org/bugzilla/show_bug.cgi?id=49217, the Tomcat developers decided that to be spec compliant they had to refuse Java Identifiers.
It is confusing that com.sun.el, (being the reference implementation?) breaks the spec by not validating identifiers.
The result is that JSP code that is tested/developed on com.sun.el fails when run on Tomcat 7.
I suggest that com.sun.el adds validation of identifiers. Preferably, this should be configurable similar to Jasper's org.apache.el.parser. SKIP_IDENTIFIER_CHECK system property.
For reference, here's Tomcat's implementation of the validation logic:
http://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/el/util/Validation.java