Bug 14695 - fmt:setBundle/message doesn't work when Tomcat 4.1.x tagpooling is enabled
Summary: fmt:setBundle/message doesn't work when Tomcat 4.1.x tagpooling is enabled
Status: RESOLVED FIXED
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.0.1
Hardware: All All
: P3 major with 1 vote (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-19 21:48 UTC by Fredrik Westermarck
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fredrik Westermarck 2002-11-19 21:48:58 UTC
If tagpooling in Tomcat 4.1.x is enabled (which it is by default) fmt:setBundle
and the following fmt:message tags always return the same messages.

The fist time the JSP-page is accessed the correct ResourceBundle is used. But
after changing the browser settings to a different (and also supported
Locale/Accept-Language) the same ResourceBundle that was requested with the
first access is used. I've tried setting the scope for the setBundle-tag to both
page and request with the same result.

If the tagpooling in Tomcat 4.1.x is disabled the tags work as expected. There
is probably some problems with the cleanup in the tag.

I haven't had the time to examine this more closely, but I can provide a
testcase that confirms the problem if you wish.
Comment 1 Pierre Delisle 2002-12-03 21:14:17 UTC
This has been fixed in release 1.0.2.

*** This bug has been marked as a duplicate of 11204 ***
Comment 2 Fredrik Westermarck 2002-12-09 12:39:50 UTC
Actually if the tagpooling feature is enabled the problem still exists when
using standard taglib 1.0.2 and Tomcat 4.1.15.

The bundle that get used is always the same as the one that was used for the
first request - no matter what language the browser accepts or in what order.
Comment 3 Pierre Delisle 2002-12-16 22:40:02 UTC
Fredrik was right; there still was a bug when the <fmt:message> tag was pooled 
and reused and a bundle was not specified explicitely.

It has now been fixed (in both EL and RT) by resetting the localizationContext 
to null when bundle is not specified explicitely as an attribute.