tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ari Suutari <ari.suut...@syncrontech.com>
Subject Fix: Tomcat 4.1.10 and tag pooling problem
Date Mon, 09 Sep 2002 10:11:12 GMT
Hi,

I did some debugging & testing with i18n tag. It appears that
the problem is in MessageTag.java. When it looks up a value from resource
bundle and there is no such resource, it doesn't remember to clear
_value object, which might contain an old value at this point
when tag pooling is being used. Following patch fixes the problem:

*** MessageTag.java     Sun Sep  8 11:37:08 2002
--- NewMessageTag.java  Mon Sep  9 13:07:52 2002
***************
*** 250,255 ****
--- 250,256 ----
          }
      catch (java.util.MissingResourceException e)
          {
+         _value = null;
          ServletContext sc = pageContext.getServletContext();
          sc.log("value not found for key:" + key);
          }


	Ari S.


On Wednesday 04 September 2002 15:48, Jungho Kim wrote:
> Which specfic tag is it?  It sounds like release() is not being invoked
> properly by the tag but can't be sure until you look at the source.
>
> regards,
>
> JK
> ----- Original Message -----
> From: "Ari Suutari" <ari.suutari@syncrontech.com>
> To: <taglibs-user@jakarta.apache.org>
> Sent: Wednesday, September 04, 2002 6:32 AM
> Subject: Fwd: Re: Tomcat 4.1.10 and tag pooling problem
>
>
> Hi,
>
> There is some kind of problem using i18n tags and
> new tomcat 4.1.10 tag pooling. Does anyone know
> what should be done to i18n to make it work ?
>
> Ari S.
>
> ----------  Forwarded Message  ----------
>
> Subject: Re: Tomcat 4.1.10 and tag pooling problem
> Date: Wed, 04 Sep 2002 11:35:28 +0200
> From: Remy Maucherat <remm@apache.org>
> To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>
>
> Ari Suutari wrote:
> > Hi,
> >
> > I have been testing tomcat 4.1.10 with our web application,
> > which uses i18n tag from jakarta-taglibs. When running
> > it under 4.1.10 with jsp default settings in web.xml it
> > produces very odd results - it seems that each i18n tag
> > return same string to page (the string might be the
> > one the first tag returns, I'm not sure). When
> > I add
> >
> >         <init-param>
> >             <param-name>enablePooling</param-name>
> >             <param-value>false</param-value>
> >         </init-param>
> >
> > to web.xml, the application works perfectly and the result
> > is similar as in tomcat 4.0.x.
>
> The tag is likely not compliant with the specification, which defines
> how a tag instance may be reused (and TC 4.1 takes advantage of that to
> lower the amount of object creation).
>
> Remy


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message