You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Ari Suutari <ar...@syncrontech.com> on 2002/09/04 12:32:23 UTC

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 <re...@apache.org>
To: Tomcat Developers List <to...@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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>

-------------------------------------------------------


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Fix: Tomcat 4.1.10 and tag pooling problem

Posted by Ari Suutari <ar...@syncrontech.com>.
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" <ar...@syncrontech.com>
> To: <ta...@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 <re...@apache.org>
> To: Tomcat Developers List <to...@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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Re: Tomcat 4.1.10 and tag pooling problem

Posted by Ari Suutari <ar...@syncrontech.com>.
Hi,

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.

	The tag looks like this:

<i18n:message key="descr.ConfirmClearReport">
Pressing 'Clear' removes current settings from memory. 
Do you want to continue?
</i18n:message>

	All i18n:message tags after this seem to return the same message, ie.
	'Pressing clear removes current settings from memory'.


		Ari S.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Fix: Tomcat 4.1.10 and tag pooling problem

Posted by Ari Suutari <ar...@syncrontech.com>.
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" <ar...@syncrontech.com>
> To: <ta...@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 <re...@apache.org>
> To: Tomcat Developers List <to...@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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Re: Tomcat 4.1.10 and tag pooling problem

Posted by Jungho Kim <ju...@sympatico.ca>.
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" <ar...@syncrontech.com>
To: <ta...@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 <re...@apache.org>
To: Tomcat Developers List <to...@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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>

-------------------------------------------------------


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>