ASF Bugzilla – Full Text Bug Listing
|Summary:||Behaviour of ResourceBundleELResolver|
|Component:||Jasper||Assignee:||Tomcat Developers Mailing List <dev>|
Description b.diedrichsen 2012-03-29 09:41:39 UTC
I have discovered the the ResourceBundleELResolver from the tomcat el-api.jar behaves differently then the one from standard el-api. The difference lays in the handling of missing properties. The tomcat version will not set the resolved property to true such that evaluation continues and finally an exception is thrown. This causes pages to crash if a property can not be found (which I think is kind of unacceptable for production sites). The bahaviour was changed due to https://issues.apache.org/bugzilla/show_bug.cgi?id=46915. I think that changing the standard behaviour of "resolving" an unbound property by just returning its key is to throwing an exception was a strong decision. I would strongly recommend of reintroducing the old bahviour and fixing the issue 46915 in a different way. If someone can point my to the requirements and corner cases related to 46915, I will gladly provide an implementation. Until then, a workaround for everybody using jsf: Subclass the ResourceBundleELResolver and override its getValue(...) method. Change it such that it sets the PropertyResolved attribute to true before any exception might occur. Register this custom resolver in the faces-config.xml with <el-resolver>
Comment 1 Mark Thomas 2012-03-30 09:37:02 UTC
Tomcat is no longer following the EL spec. The behaviour prior to the fix for bug 46915 was correct. I'm not sure it is possible to fix bug 46915 and be specification compliant. I'll revert the fix for bug 46915, put together some test cases and see what I can come up with. Depending on how well things go, bug 46915 will either stay as FIXED or be changed to INVALID.
Comment 2 b.diedrichsen 2012-03-30 10:09:43 UTC
Thanks for the quick reply. I did not check the spec so wasn't aware that the current behaviour actually violates the el specs. Why was the fix for bug 46915 done in the first place? Did the specs change from then to now? Anyways, keep up the good work. Tomcat is an impressive and very reliable product.
Comment 3 Mark Thomas 2012-03-30 15:23:19 UTC
Comment 4 Mark Thomas 2012-03-30 16:35:59 UTC
Fixed in trunk and 7.0.x and will be included in 7.0.27 onwards. The fixed has been proposed for 6.0.x.
Comment 5 b.diedrichsen 2012-03-30 18:09:37 UTC
Thank you Mark, this was really a quick resolution of the issue.