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 try { @@ -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;
*** Bug 13630 has been marked as a duplicate of this bug. ***
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?
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.