https://bz.apache.org/bugzilla/show_bug.cgi?id=69659

--- Comment #5 from Mark Thomas <ma...@apache.org> ---
Tx. That helps. I've obviously been spending too much time with the Jakarta EL
spec. Pure EL will throw exceptions for those. I'd forgotten about the null
handling implemented in Jakarta Pages.

The challenge here is that this behaviour is implemented in an Jakarta Pages
API provided ELResolver. For Tomcat 9 it is the
javax.servlet.jsp.el.ScopedAttributeELResolver. In Tomcat 10.1 onwards, that
was refactored into 3 separate ELResolvers and the behaviour can be found in
jakarta.servlet.jsp.el.NotFoundELResolver.

The ELResolvers are provided by the ELContext and the ELContext is provided at
evaluation. You can have the same expression, evaluated with different
contexts, returning different results.

To add to the "fun" a general solution that would work for all users is next to
impossible because correct optimisation depends on understanding what every
ELResolver in the chain might do and while that is known for the standard
ELResolvers, it isn't for any custom ELResolvers.

Any solution is looking more user specific the more I look at it. That wouldn't
block any patch along those lines but it does raise the bar for any patch t be
acceptable.

I think I'd be looking at a regex to update the JSPs followed by a manual
review before committing rather than optimizing in the compiler.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to