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 2012/03/29 11:41:39 UTC

DO NOT REPLY [Bug 53001] New: Behaviour of ResourceBundleELResolver

https://issues.apache.org/bugzilla/show_bug.cgi?id=53001

             Bug #: 53001
           Summary: Behaviour of ResourceBundleELResolver
           Product: Tomcat 7
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Servlet & JSP API
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: b.diedrichsen@googlemail.com
    Classification: Unclassified


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>

-- 
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 53001] Behaviour of ResourceBundleELResolver

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53001

--- Comment #5 from b.diedrichsen@googlemail.com 2012-03-30 18:09:37 UTC ---
Thank you Mark,
this was really a quick resolution of the issue.

-- 
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 53001] Behaviour of ResourceBundleELResolver

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53001

--- Comment #3 from Mark Thomas <ma...@apache.org> 2012-03-30 15:23:19 UTC ---
No change in the spec. I failed to check the EL spec before I fixed bug 46915.
If I had, that would have been resolved as INVALID. It looks like EL 2.2
(Tomcat 7) has some new features that would allow the requirement in bug 46915
to be met. Time to write some unit tests.

-- 
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


[Bug 53001] Behaviour of ResourceBundleELResolver

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53001

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Konstantin Kolinko <kn...@gmail.com> ---
Fixed in 6.0 with r1343356 and will be in 6.0.36

-- 
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 53001] Behaviour of ResourceBundleELResolver

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53001

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Servlet & JSP API           |Jasper
            Version|unspecified                 |6.0.35
            Product|Tomcat 7                    |Tomcat 6
   Target Milestone|---                         |default

--- Comment #4 from Mark Thomas <ma...@apache.org> 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.

-- 
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 53001] Behaviour of ResourceBundleELResolver

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53001

--- Comment #2 from b.diedrichsen@googlemail.com 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.

-- 
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 53001] Behaviour of ResourceBundleELResolver

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53001

--- Comment #1 from Mark Thomas <ma...@apache.org> 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.

-- 
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