https://issues.apache.org/bugzilla/show_bug.cgi?id=56031
Bug ID: 56031
Summary: Tomcat 7.0.50 breaks on valid EL ternary expressions
Product: Tomcat 7
Version: 7.0.50
Hardware: PC
OS: Mac OS X 10.4
Status: NEW
Severity: regression
Priority: P2
Component: Jasper
Assignee: [email protected]
Reporter: [email protected]
After migrating an existing webapp to tomcat 7.0.50 I started getting
exceptions for EL expressions that worked fine in previous versions (everything
seems to work just fine in 7.0.47 and previous versions, also tomcat 6.0.x).
All the errors I got were related to ternary expressions, and the error
reported a strange corrupted version of the expression.
This is a sample expression:
${my:link(!empty registration ? registration : ‘/test/registration')}
And this is the error I get:
org.apache.jasper.JasperException: /WEB-INF/tags/project/tool.tag (line: 224,
column: 110) "${my:link(!empty registration ? registration :
'/test/registration')}" contains invalid expression(s): javax.el.ELException:
Failed to parse the expression
[${my:link(!emptyregistration?::'/test/registration')}]
As you can see in the error tomcat reports the expression as
"${my:link(!emptyregistration?::’/test/registration')}", removing all the
whitespace and also replacing the "registration" variable with ":".
I checked all the settings to see if there may be a problem with the file
encoding, whitespace characters or similar, but everything looks ok. After
downgrading to 7.0.47 with the same webapp and settings everything works ok.
I got several other errors in similar expressions, for all of them the
expression reported in the errors has all the whitespace removed.
I did a few tests and for this specific case I can make it work by changing it
in the following way:
${my:link(!empty registration ? registration : ‘/test/registration')} -> does
not work
${my:link(!empty registration ? 'test' : ‘/test/registration')} -> works
If this matters, the problems showed up in jsp tag files, with declared jsp
version 2.0 (<jsp:root version="2.0" ), xml format. Tested both on mac
osx/java6 and redhat linux/java6.
I couldn't find anything that may be related in jasper changelog between 7.0.47
and 7.0.50... do you have any idea if there is something that could cause this
behaviour?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]