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 2010/11/01 23:20:10 UTC
DO NOT REPLY [Bug 50194] New: ELParsing fails when an expression
with function contains a dash (minus) on 6.0.2.20 and up
https://issues.apache.org/bugzilla/show_bug.cgi?id=50194
Summary: ELParsing fails when an expression with function
contains a dash (minus) on 6.0.2.20 and up
Product: Tomcat 6
Version: 6.0.20
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: regression
Priority: P2
Component: Jasper
AssignedTo: dev@tomcat.apache.org
ReportedBy: jsartoris@hotmail.com
Hello,
There is possibly a regression in the ELParser code on Tomcat 6.0.2.20. The
issue I see works fine on Tomcat 6.0.2.18.
I've also tried on Tomcat 6.0.2.29 and it is still failing.
A JSF application which uses Facelets (with .xhtml files) and a custom tag
which contains an expression with a function call starts to fail in Tomcat
6.0.2.20.
The code snippet from the app is:
------------------
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:pre-posttag="http://www.test.com/dash">
<h:outputText value="testing" rendered="#{pre-posttag:test()}"/>
</ui:composition>
-----------------
The exception thrown is (See caused by section):
====================
Throwable occurred: com.sun.facelets.tag.TagAttributeException: /test.xhtml
@20,63 rendered="#{pre-posttag:test()}" Function 'posttag:test' not found
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)
.....
Caused by: javax.el.ELException: Function 'posttag:test' not found
at org.apache.el.lang.ExpressionBuilder.visit(ExpressionBuilder.java:175)
at org.apache.el.parser.SimpleNode.accept(SimpleNode.java:145)
at org.apache.el.parser.SimpleNode.accept(SimpleNode.java:148)
at org.apache.el.lang.ExpressionBuilder.prepare(ExpressionBuilder.java:133)
at org.apache.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:151)
at
org.apache.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:194)
at
org.apache.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:68)
at com.sun.facelets.tag.TagAttribute.getValueExpression(TagAttribute.java:256)
... 35 more
====================
I've been narrowing the problem down but I cannot find the appropriate way to
fix this as it's generated code. The issue appears to be caused by the changes
made to the code in this revision:
http://svn.apache.org/viewvc?view=revision&revision=681737
--
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 50194] ELParsing fails when an expression with
function contains a dash (minus) on 6.0.2.20 and up
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50194
--- Comment #1 from Jay S <js...@hotmail.com> 2010-11-01 18:25:14 EDT ---
Sorry, meant to add more description. The issue appears to be in the parsing
of the expression, the dash in the namespace for the tag is now causing a
problem. As you can see in the exception, which states:
Function 'posttag:test' not found
the "pre-" is missing. I've been trying to debug the code, but it's been very
difficult to debug since it's generated code.
--
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 50194] ELParsing fails when an expression with
function contains a dash (minus) on 6.0.2.20 and up
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50194
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #2 from Mark Thomas <ma...@apache.org> 2010-11-12 13:53:18 EST ---
There are a handful of different specifications involved here.
First of all there is the JSP 2.1 specification. It states in Table JSP.1-9
that:
A prefix must follow the naming convention specified in the XML namespaces
specification.
So far so good, '-' is permitted by the XML namespaces specification.
Then we move to the EL 2.1 specification. Unfortunately, it is more
restrictive. 1.15 defines the syntax as:
[ns:]f([a1[,a2[,...[,an]]]])
where ns is a namespace. Again, so far so good.
However in the collected syntax there is the following:
FunctionInvocation::=(Identifier ‘:’)? Identifier ‘(‘
( Expression ( ‘,’ Expression )* )? ‘)’
and
Identifier ::= Java language identifier
So the namespace also has to comply with the rules for Java Language
Identifiers which do not permit the use of '-'.
Tomcat's EL processing has been made gradually more specification compliant as
bugs have been raised that highlight various issues caused by a relaxed
interpretation of the specification. I suspect the change between 6.0.18 and
6.0.29 was as a result of one of these.
--
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