Bug 12508 - i18n MessageTag does not work with tag pooling
Summary: i18n MessageTag does not work with tag pooling
Alias: None
Product: Taglibs
Classification: Unclassified
Component: I18N Taglib (show other bugs)
Version: 1.0
Hardware: PC Linux
: P3 major with 2 votes (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
: 13630 (view as bug list)
Depends on:
Reported: 2002-09-11 05:44 UTC by Ari Suutari
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Ari Suutari 2002-09-11 05:44:07 UTC
MessageTag produces unexpected results when tag pooling is in use. 
This is caused by first value of tag being present on all 
tag invocations.This can be fixed by this patch: 
--- MessageTag.java     Sun Sep  8 11:37:08 2002 
+++ NewMessageTag.java  Tue Sep 10 08:35:48 2002 
@@ -238,6 +238,8 @@ 
         throw new JspException("A bundle must be defined by the BundleTag 
prior to using a MessageTag."); 
+    _value = null; 
     // see if the bundle has a value, if not, we default to the tag contents 
@@ -306,6 +308,10 @@ 
         throw new JspException("IO Error: " + e.getMessage()); 
+    // clear current value 
+    _value = null; 
     // only process the body once 
     return BodyTag.EVAL_PAGE;
Comment 1 Mark Yang 2002-10-15 10:34:49 UTC
*** Bug 13630 has been marked as a duplicate of this bug. ***
Comment 2 Jan Mauersberger 2002-11-15 11:52:25 UTC
Hmm, I am not deep into this - but have the same problem with the MessageTag.
The patch did not work for me either.

Instead of resetting the value, you should reset the bundle, shouln't you?
Comment 3 Glenn Nielsen 2002-12-17 02:34:45 UTC
The message tag was reviewed for compliance with the JSP tag lifecycle so
that it will work in JSP containers like Tomcat 4.1 and Jasper 2.
Should be fixed in the next nightly build.