I’ve got a JSF1.2 application which deploys fine on Tomcat6 and Tomcat7.
So far so good.
One of the pages contains the following property on a h:inputText:
disabled="#{quoteFinance.quoteSaved or quoteRequest.quoteDisabled or setting.protected}"
This validates and works fine on aforementioned Tomcat servers.
However, websphere8 believes this is a problem and throws the following error:
disabled="#{quoteFinance.quoteSaved or quoteRequest.quoteDisabled or setting.protected}" [protected] is not a valid Java identifier
at com.sun.facelets.tag.TagAttribute.getValueExpression(TagAttribute.java:259)
at com.sun.facelets.tag.jsf.ComponentRule$ValueExpressionMetadata.applyMetadata(ComponentRule.java:69)
at com.sun.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:36)
at com.sun.facelets.tag.MetaTagHandler.setAttributes(MetaTagHandler.java:76)
Cause:
javax.el.ELException: [protected] is not a valid Java identifier
at org.apache.el.parser.AstDotSuffix.setImage(AstDotSuffix.java:45)
at org.apache.el.parser.ELParser.DotSuffix(ELParser.java:1067)
at org.apache.el.parser.ELParser.ValueSuffix(ELParser.java:1033)
at org.apache.el.parser.ELParser.Value(ELParser.java:978)
at org.apache.el.parser.ELParser.Unary(ELParser.java:948)
at org.apache.el.parser.ELParser.Multiplication(ELParser.java:712)
at org.apache.el.parser.ELParser.Math(ELParser.java:632)
at org.apache.el.parser.ELParser.Compare(ELParser.java:444)
at org.apache.el.parser.ELParser.Equality(ELParser.java:338)
at org.apache.el.parser.ELParser.And(ELParser.java:282)
I had a similar issue with #{msg.continue} which is perfectly fine, but because continue is a reserved word, WAS8 throws me an error.
- Why does websphere not accept this while the code is working perfectly?
- How can I resolve this problem?
Many thanks!
From the Expression Language 2.2 spec:
protectedcan’t be used as an identifier in Java as it is reserved.This restriction applied in EL 2.1 too, so it was likely a bug in your old platform’s EL parser that this ever worked.