AW: TagHandlerPool doesn't release Tags on reuse

2002-11-11 Thread Torsten Fohrer

thanks all, the article clarify some thinks.

cu Torsten Fohrer

> -Ursprüngliche Nachricht-
> Von: Hans Bergsten [mailto:hans@;gefionsoftware.com]
> Gesendet: Montag, 11. November 2002 21:06
> An: Tomcat Developers List
> Betreff: Re: TagHandlerPool doesn't release Tags on reuse
> 
> 
> Torsten,
> 
> You may want to read the section about the tag handler lifecycle in an
> article I wrote for ONJava.com:
> 
><http://www.onjava.com/pub/a/onjava/2001/11/07/jsp12.html>
> 
> It explains how the methods are called and how to deal with attribute
> values.
> 
> Hans
> Torsten Fohrer wrote:
> > But if i looking into the generated jsp/servlet sources, i 
> see the following:
> > 
> > --- example ---
> >   /*   tools:simpleCell  */
> >   de.dcsi.util.jsp.taglibs.Validator_SimpleCell 
> > _jspx_th_tools_simpleCell_0 = 
> (de.dcsi.util.jsp.taglibs.Validator_SimpleCell) 
> > _jspx_
> > 
> tagPool_tools_simpleCell_width_valign_messageName_height_error
> Name_errorColor.get(de.dcsi.util.jsp.taglibs.Validator_SimpleC
> ell.class);
> >   _jspx_th_tools_simpleCell_0.setPageContext(pageContext);
> >   _jspx_th_tools_simpleCell_0.setParent(null);
> >   _jspx_th_tools_simpleCell_0.setErrorName("messages");
> >   _jspx_th_tools_simpleCell_0.setMessageName("login");
> >   _jspx_th_tools_simpleCell_0.setHeight("30");
> >   _jspx_th_tools_simpleCell_0.setValign("top");
> >   _jspx_th_tools_simpleCell_0.setWidth("14%");
> >   _jspx_th_tools_simpleCell_0.setErrorColor( errorColor );
> >   int _jspx_eval_tools_simpleCell_0 = 
> > _jspx_th_tools_simpleCell_0.doStartTag();
> >   if (_jspx_th_tools_simpleCell_0.doEndTag() == 
> > javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
> > return;
> > 
> > 
> >  example
> > 
> > If i now reset my tag to a initial state in doStartTag() i 
> haven't any 
> > properties set
> > 
> > Who call the release method in reaction of the GC, finalize 
> can't it.
> > 
> > On Monday 11 November 2002 18:44, Kin-Man Chung wrote:
> > 
> >>According to the JSP 1.2 Spec, the release method is not 
> invoked between
> >>tag usages, but is invoked before GC of the tag handler.  Therefore
> >>it should not be used to reset the tag handler to its initial state;
> >>you should do that in doStartTag.  See p164 and p166.
> >>
> >>
> >>>Date: Mon, 11 Nov 2002 13:32:31 +0100
> >>>From: Torsten Fohrer <[EMAIL PROTECTED]>
> >>>Subject: TagHandlerPool doesn't release Tags on reuse
> >>>To: "'[EMAIL PROTECTED]'" 
> <[EMAIL PROTECTED]>
> >>>
> >>>
> >>>I have some jsp sites which taglibs. With pooling enabled, 
> some problems
> >>>occures.
> >>>
> >>>Samples:
> >>>
> >>>  Customer Registration: all fields have the same values???
> >>>  Sessions Values are used together
> >>>
> >>>After reading the jsp spezifikation and source of the
> >>>jasper/runtime/TagHandlerPool, i see that the pool doesn't 
> call release
> >>>in his reuse method?
> >>>
> >>>After adding a general release in the reuse methode, which 
> perhaps breaks
> >>>the lifecycle of the IterationTag ( see jsp-spec, page 168 ) it's
> >>>working.
> >>>
> >>>/**
> >>> * Adds the given tag handler to this tag handler 
> pool, unless this
> >>>tag * handler pool has already reached its capacity, in 
> which case the
> >>>tag * handler's release() method is called.
> >>> *
> >>> * @param handler Tag handler to add to this tag handler pool
> >>> */
> >>>public synchronized void reuse(Tag handler) {
> >>>
> >>>// Releasing Tags, see jsp spec 1.2-fcs, page 172
> >>>handler.release();
> >>>
> >>>if (current < (handlers.length - 1))
> >>>handlers[++current] = handler;
> >>>}
> >>>
> >>>Torsten Fohrer
> >>>
> >>>**
> >>>* DCSI AG* Tel.: +49 7131 155 88-0   *
> >>>* Lessingstrasse 17-19   * Fax.: +49 7131 155 88-99  *
> >>>* D-74076 Heilbronn  * [EMAIL

Re: TagHandlerPool doesn't release Tags on reuse

2002-11-11 Thread Hans Bergsten
Torsten,

You may want to read the section about the tag handler lifecycle in an
article I wrote for ONJava.com:

  <http://www.onjava.com/pub/a/onjava/2001/11/07/jsp12.html>

It explains how the methods are called and how to deal with attribute
values.

Hans
Torsten Fohrer wrote:

But if i looking into the generated jsp/servlet sources, i see the following:

--- example ---
  /*   tools:simpleCell  */
  de.dcsi.util.jsp.taglibs.Validator_SimpleCell 
_jspx_th_tools_simpleCell_0 = (de.dcsi.util.jsp.taglibs.Validator_SimpleCell) 
_jspx_
tagPool_tools_simpleCell_width_valign_messageName_height_errorName_errorColor.get(de.dcsi.util.jsp.taglibs.Validator_SimpleCell.class);
  _jspx_th_tools_simpleCell_0.setPageContext(pageContext);
  _jspx_th_tools_simpleCell_0.setParent(null);
  _jspx_th_tools_simpleCell_0.setErrorName("messages");
  _jspx_th_tools_simpleCell_0.setMessageName("login");
  _jspx_th_tools_simpleCell_0.setHeight("30");
  _jspx_th_tools_simpleCell_0.setValign("top");
  _jspx_th_tools_simpleCell_0.setWidth("14%");
  _jspx_th_tools_simpleCell_0.setErrorColor( errorColor );
  int _jspx_eval_tools_simpleCell_0 = 
_jspx_th_tools_simpleCell_0.doStartTag();
  if (_jspx_th_tools_simpleCell_0.doEndTag() == 
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return;


 example

If i now reset my tag to a initial state in doStartTag() i haven't any 
properties set

Who call the release method in reaction of the GC, finalize can't it.

On Monday 11 November 2002 18:44, Kin-Man Chung wrote:

According to the JSP 1.2 Spec, the release method is not invoked between
tag usages, but is invoked before GC of the tag handler.  Therefore
it should not be used to reset the tag handler to its initial state;
you should do that in doStartTag.  See p164 and p166.



Date: Mon, 11 Nov 2002 13:32:31 +0100
From: Torsten Fohrer <[EMAIL PROTECTED]>
Subject: TagHandlerPool doesn't release Tags on reuse
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>


I have some jsp sites which taglibs. With pooling enabled, some problems
occures.

Samples:

 Customer Registration: all fields have the same values???
 Sessions Values are used together

After reading the jsp spezifikation and source of the
jasper/runtime/TagHandlerPool, i see that the pool doesn't call release
in his reuse method?

After adding a general release in the reuse methode, which perhaps breaks
the lifecycle of the IterationTag ( see jsp-spec, page 168 ) it's
working.

   /**
* Adds the given tag handler to this tag handler pool, unless this
tag * handler pool has already reached its capacity, in which case the
tag * handler's release() method is called.
*
* @param handler Tag handler to add to this tag handler pool
*/
   public synchronized void reuse(Tag handler) {

   // Releasing Tags, see jsp spec 1.2-fcs, page 172
   handler.release();

   if (current < (handlers.length - 1))
   handlers[++current] = handler;
   }

Torsten Fohrer

**
* DCSI AG* Tel.: +49 7131 155 88-0   *
* Lessingstrasse 17-19   * Fax.: +49 7131 155 88-99  *
* D-74076 Heilbronn  * [EMAIL PROTECTED]*
* GERMANY* http://www.dcsi.de*
**

--
To unsubscribe, e-mail:  
<mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional
commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:  
<mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional commands,
e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>



--
Hans Bergsten		[EMAIL PROTECTED]
Gefion Software		http://www.gefionsoftware.com
JavaServer Pages	http://TheJSPBook.com


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>




Re: TagHandlerPool doesn't release Tags on reuse

2002-11-11 Thread Kin-Man Chung
Use doStartTag for inits, doEndTag for cleanups.  release will be invoked
from destroy.


> Date: Mon, 11 Nov 2002 20:34:13 +0100
> From: [EMAIL PROTECTED] (Torsten Fohrer)
> Subject: Re: TagHandlerPool doesn't release Tags on reuse
> X-Sender: [EMAIL PROTECTED]
> To: Tomcat Developers List <[EMAIL PROTECTED]>
> Content-disposition: inline
> 
> 
> But if i looking into the generated jsp/servlet sources, i see the following:
> 
> --- example ---
>   /*   tools:simpleCell  */
>   de.dcsi.util.jsp.taglibs.Validator_SimpleCell 
> _jspx_th_tools_simpleCell_0 = (de.dcsi.util.jsp.taglibs.Validator_SimpleCell) 
> _jspx_
> 
tagPool_tools_simpleCell_width_valign_messageName_height_errorName_errorColor.ge
t(de.dcsi.util.jsp.taglibs.Validator_SimpleCell.class);
>   _jspx_th_tools_simpleCell_0.setPageContext(pageContext);
>   _jspx_th_tools_simpleCell_0.setParent(null);
>   _jspx_th_tools_simpleCell_0.setErrorName("messages");
>   _jspx_th_tools_simpleCell_0.setMessageName("login");
>   _jspx_th_tools_simpleCell_0.setHeight("30");
>   _jspx_th_tools_simpleCell_0.setValign("top");
>   _jspx_th_tools_simpleCell_0.setWidth("14%");
>   _jspx_th_tools_simpleCell_0.setErrorColor( errorColor );
>   int _jspx_eval_tools_simpleCell_0 = 
> _jspx_th_tools_simpleCell_0.doStartTag();
>   if (_jspx_th_tools_simpleCell_0.doEndTag() == 
> javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
> return;
> 
> 
>  example
> 
> If i now reset my tag to a initial state in doStartTag() i haven't any 
> properties set
> 
> Who call the release method in reaction of the GC, finalize can't it.
> 
> On Monday 11 November 2002 18:44, Kin-Man Chung wrote:
> > According to the JSP 1.2 Spec, the release method is not invoked between
> > tag usages, but is invoked before GC of the tag handler.  Therefore
> > it should not be used to reset the tag handler to its initial state;
> > you should do that in doStartTag.  See p164 and p166.
> >
> > > Date: Mon, 11 Nov 2002 13:32:31 +0100
> > > From: Torsten Fohrer <[EMAIL PROTECTED]>
> > > Subject: TagHandlerPool doesn't release Tags on reuse
> > > To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> > >
> > >
> > > I have some jsp sites which taglibs. With pooling enabled, some problems
> > > occures.
> > >
> > > Samples:
> > >
> > >   Customer Registration: all fields have the same values???
> > >   Sessions Values are used together
> > >
> > > After reading the jsp spezifikation and source of the
> > > jasper/runtime/TagHandlerPool, i see that the pool doesn't call release
> > > in his reuse method?
> > >
> > > After adding a general release in the reuse methode, which perhaps breaks
> > > the lifecycle of the IterationTag ( see jsp-spec, page 168 ) it's
> > > working.
> > >
> > > /**
> > >  * Adds the given tag handler to this tag handler pool, unless this
> > > tag * handler pool has already reached its capacity, in which case the
> > > tag * handler's release() method is called.
> > >  *
> > >  * @param handler Tag handler to add to this tag handler pool
> > >  */
> > > public synchronized void reuse(Tag handler) {
> > >
> > > // Releasing Tags, see jsp spec 1.2-fcs, page 172
> > > handler.release();
> > >
> > > if (current < (handlers.length - 1))
> > > handlers[++current] = handler;
> > > }
> > >
> > > Torsten Fohrer
> > >
> > > **
> > > * DCSI AG* Tel.: +49 7131 155 88-0   *
> > > * Lessingstrasse 17-19   * Fax.: +49 7131 155 88-99  *
> > > * D-74076 Heilbronn  * [EMAIL PROTECTED]*
> > > * GERMANY* http://www.dcsi.de*
> > > **
> > >
> > > --
> > > To unsubscribe, e-mail:  
> > > <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional
> > > commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>
> >
> > --
> > To unsubscribe, e-mail:  
> > <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional commands,
> > e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>




RE: TagHandlerPool doesn't release Tags on reuse

2002-11-11 Thread Becker, Michael
If you clean up in the doEndTag(), it works great...  We had the same
problem with our tags.

-Original Message-
From: Torsten Fohrer [mailto:TFohrer@;t-online.de] 
Sent: Monday, November 11, 2002 1:39 PM
To: Tomcat Developers List
Subject: Re: TagHandlerPool doesn't release Tags on reuse


Here is the same source code for taglib call, generated with a tomcat
4.0.4

   /*   tools:simpleCell  */
de.dcsi.util.jsp.taglibs.Validator_SimpleCell 
_jspx_th_tools_simpleCell_32 = new
de.dcsi.util.jsp.taglibs.Validator_Simp
leCell();
 
_jspx_th_tools_simpleCell_32.setPageContext(pageContext);
_jspx_th_tools_simpleCell_32.setParent(null);
_jspx_th_tools_simpleCell_32.setErrorName("messages");
_jspx_th_tools_simpleCell_32.setMessageName("password");
_jspx_th_tools_simpleCell_32.setWidth("38%");
_jspx_th_tools_simpleCell_32.setErrorColor( errorColor
);
try {
int _jspx_eval_tools_simpleCell_32 = 
_jspx_th_tools_simpleCell_32.doStartTag();
if (_jspx_eval_tools_simpleCell_32 == 
javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED)
throw new JspTagException("Since tag handler
class 
de.dcsi.util.jsp.taglibs.Validator_SimpleCell does not implem
ent BodyTag, it can't return BodyTag.EVAL_BODY_TAG");
if (_jspx_eval_tools_simpleCell_32 != 
javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
// end
// begin } while 
(_jspx_th_tools_simpleCell_32.doAfterBody() == 
javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
}
if (_jspx_th_tools_simpleCell_32.doEndTag() == 
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return;
} finally {
_jspx_th_tools_simpleCell_32.release();
}



On Monday 11 November 2002 18:44, Kin-Man Chung wrote:
> According to the JSP 1.2 Spec, the release method is not invoked
between
> tag usages, but is invoked before GC of the tag handler.  Therefore
> it should not be used to reset the tag handler to its initial state;
> you should do that in doStartTag.  See p164 and p166.
>
> > Date: Mon, 11 Nov 2002 13:32:31 +0100
> > From: Torsten Fohrer <[EMAIL PROTECTED]>
> > Subject: TagHandlerPool doesn't release Tags on reuse
> > To: "'[EMAIL PROTECTED]'"
<[EMAIL PROTECTED]>
> >
> >
> > I have some jsp sites which taglibs. With pooling enabled, some
problems
> > occures.
> >
> > Samples:
> >
> >   Customer Registration: all fields have the same values???
> >   Sessions Values are used together
> >
> > After reading the jsp spezifikation and source of the
> > jasper/runtime/TagHandlerPool, i see that the pool doesn't call
release
> > in his reuse method?
> >
> > After adding a general release in the reuse methode, which perhaps
breaks
> > the lifecycle of the IterationTag ( see jsp-spec, page 168 ) it's
> > working.
> >
> > /**
> >  * Adds the given tag handler to this tag handler pool, unless
this
> > tag * handler pool has already reached its capacity, in which case
the
> > tag * handler's release() method is called.
> >  *
> >  * @param handler Tag handler to add to this tag handler pool
> >  */
> > public synchronized void reuse(Tag handler) {
> >
> > // Releasing Tags, see jsp spec 1.2-fcs, page 172
> > handler.release();
> >
> > if (current < (handlers.length - 1))
> > handlers[++current] = handler;
> > }
> >
> > Torsten Fohrer
> >
> > **
> > * DCSI AG* Tel.: +49 7131 155 88-0   *
> > * Lessingstrasse 17-19   * Fax.: +49 7131 155 88-99  *
> > * D-74076 Heilbronn  * [EMAIL PROTECTED]*
> > * GERMANY* http://www.dcsi.de*
> > **
> >
> > --
> > To unsubscribe, e-mail:  
> > <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional
> > commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:  
> <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional
commands,
> e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:
<mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-dev-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>




Re: TagHandlerPool doesn't release Tags on reuse

2002-11-11 Thread Torsten Fohrer

Here is the same source code for taglib call, generated with a tomcat 4.0.4

   /*   tools:simpleCell  */
de.dcsi.util.jsp.taglibs.Validator_SimpleCell 
_jspx_th_tools_simpleCell_32 = new de.dcsi.util.jsp.taglibs.Validator_Simp
leCell();
_jspx_th_tools_simpleCell_32.setPageContext(pageContext);
_jspx_th_tools_simpleCell_32.setParent(null);
_jspx_th_tools_simpleCell_32.setErrorName("messages");
_jspx_th_tools_simpleCell_32.setMessageName("password");
_jspx_th_tools_simpleCell_32.setWidth("38%");
_jspx_th_tools_simpleCell_32.setErrorColor( errorColor );
try {
int _jspx_eval_tools_simpleCell_32 = 
_jspx_th_tools_simpleCell_32.doStartTag();
if (_jspx_eval_tools_simpleCell_32 == 
javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED)
throw new JspTagException("Since tag handler class 
de.dcsi.util.jsp.taglibs.Validator_SimpleCell does not implem
ent BodyTag, it can't return BodyTag.EVAL_BODY_TAG");
if (_jspx_eval_tools_simpleCell_32 != 
javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
// end
// begin } while 
(_jspx_th_tools_simpleCell_32.doAfterBody() == 
javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
}
if (_jspx_th_tools_simpleCell_32.doEndTag() == 
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return;
} finally {
_jspx_th_tools_simpleCell_32.release();
}



On Monday 11 November 2002 18:44, Kin-Man Chung wrote:
> According to the JSP 1.2 Spec, the release method is not invoked between
> tag usages, but is invoked before GC of the tag handler.  Therefore
> it should not be used to reset the tag handler to its initial state;
> you should do that in doStartTag.  See p164 and p166.
>
> > Date: Mon, 11 Nov 2002 13:32:31 +0100
> > From: Torsten Fohrer <[EMAIL PROTECTED]>
> > Subject: TagHandlerPool doesn't release Tags on reuse
> > To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >
> >
> > I have some jsp sites which taglibs. With pooling enabled, some problems
> > occures.
> >
> > Samples:
> >
> >   Customer Registration: all fields have the same values???
> >   Sessions Values are used together
> >
> > After reading the jsp spezifikation and source of the
> > jasper/runtime/TagHandlerPool, i see that the pool doesn't call release
> > in his reuse method?
> >
> > After adding a general release in the reuse methode, which perhaps breaks
> > the lifecycle of the IterationTag ( see jsp-spec, page 168 ) it's
> > working.
> >
> > /**
> >  * Adds the given tag handler to this tag handler pool, unless this
> > tag * handler pool has already reached its capacity, in which case the
> > tag * handler's release() method is called.
> >  *
> >  * @param handler Tag handler to add to this tag handler pool
> >  */
> > public synchronized void reuse(Tag handler) {
> >
> > // Releasing Tags, see jsp spec 1.2-fcs, page 172
> > handler.release();
> >
> > if (current < (handlers.length - 1))
> > handlers[++current] = handler;
> > }
> >
> > Torsten Fohrer
> >
> > **
> > * DCSI AG* Tel.: +49 7131 155 88-0   *
> > * Lessingstrasse 17-19   * Fax.: +49 7131 155 88-99  *
> > * D-74076 Heilbronn  * [EMAIL PROTECTED]*
> > * GERMANY* http://www.dcsi.de*
> > **
> >
> > --
> > To unsubscribe, e-mail:  
> > <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional
> > commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:  
> <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional commands,
> e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>




Re: TagHandlerPool doesn't release Tags on reuse

2002-11-11 Thread Torsten Fohrer

But if i looking into the generated jsp/servlet sources, i see the following:

--- example ---
  /*   tools:simpleCell  */
  de.dcsi.util.jsp.taglibs.Validator_SimpleCell 
_jspx_th_tools_simpleCell_0 = (de.dcsi.util.jsp.taglibs.Validator_SimpleCell) 
_jspx_
tagPool_tools_simpleCell_width_valign_messageName_height_errorName_errorColor.get(de.dcsi.util.jsp.taglibs.Validator_SimpleCell.class);
  _jspx_th_tools_simpleCell_0.setPageContext(pageContext);
  _jspx_th_tools_simpleCell_0.setParent(null);
  _jspx_th_tools_simpleCell_0.setErrorName("messages");
  _jspx_th_tools_simpleCell_0.setMessageName("login");
  _jspx_th_tools_simpleCell_0.setHeight("30");
  _jspx_th_tools_simpleCell_0.setValign("top");
  _jspx_th_tools_simpleCell_0.setWidth("14%");
  _jspx_th_tools_simpleCell_0.setErrorColor( errorColor );
  int _jspx_eval_tools_simpleCell_0 = 
_jspx_th_tools_simpleCell_0.doStartTag();
  if (_jspx_th_tools_simpleCell_0.doEndTag() == 
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return;


 example

If i now reset my tag to a initial state in doStartTag() i haven't any 
properties set

Who call the release method in reaction of the GC, finalize can't it.

On Monday 11 November 2002 18:44, Kin-Man Chung wrote:
> According to the JSP 1.2 Spec, the release method is not invoked between
> tag usages, but is invoked before GC of the tag handler.  Therefore
> it should not be used to reset the tag handler to its initial state;
> you should do that in doStartTag.  See p164 and p166.
>
> > Date: Mon, 11 Nov 2002 13:32:31 +0100
> > From: Torsten Fohrer <[EMAIL PROTECTED]>
> > Subject: TagHandlerPool doesn't release Tags on reuse
> > To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >
> >
> > I have some jsp sites which taglibs. With pooling enabled, some problems
> > occures.
> >
> > Samples:
> >
> >   Customer Registration: all fields have the same values???
> >   Sessions Values are used together
> >
> > After reading the jsp spezifikation and source of the
> > jasper/runtime/TagHandlerPool, i see that the pool doesn't call release
> > in his reuse method?
> >
> > After adding a general release in the reuse methode, which perhaps breaks
> > the lifecycle of the IterationTag ( see jsp-spec, page 168 ) it's
> > working.
> >
> > /**
> >  * Adds the given tag handler to this tag handler pool, unless this
> > tag * handler pool has already reached its capacity, in which case the
> > tag * handler's release() method is called.
> >  *
> >  * @param handler Tag handler to add to this tag handler pool
> >  */
> > public synchronized void reuse(Tag handler) {
> >
> > // Releasing Tags, see jsp spec 1.2-fcs, page 172
> > handler.release();
> >
> > if (current < (handlers.length - 1))
> > handlers[++current] = handler;
> > }
> >
> > Torsten Fohrer
> >
> > **
> > * DCSI AG* Tel.: +49 7131 155 88-0   *
> > * Lessingstrasse 17-19   * Fax.: +49 7131 155 88-99  *
> > * D-74076 Heilbronn  * [EMAIL PROTECTED]*
> > * GERMANY* http://www.dcsi.de*
> > **
> >
> > --
> > To unsubscribe, e-mail:  
> > <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional
> > commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:  
> <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional commands,
> e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>




Re: TagHandlerPool doesn't release Tags on reuse

2002-11-11 Thread Kin-Man Chung
According to the JSP 1.2 Spec, the release method is not invoked between
tag usages, but is invoked before GC of the tag handler.  Therefore
it should not be used to reset the tag handler to its initial state;
you should do that in doStartTag.  See p164 and p166.


> Date: Mon, 11 Nov 2002 13:32:31 +0100
> From: Torsten Fohrer <[EMAIL PROTECTED]>
> Subject: TagHandlerPool doesn't release Tags on reuse
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> 
> 
> I have some jsp sites which taglibs. With pooling enabled, some problems
> occures. 
> 
> Samples:
> 
>   Customer Registration: all fields have the same values???
>   Sessions Values are used together
> 
> After reading the jsp spezifikation and source of the
> jasper/runtime/TagHandlerPool, i see that the pool doesn't call release in
> his reuse method? 
> 
> After adding a general release in the reuse methode, which perhaps breaks
> the lifecycle of the IterationTag ( see jsp-spec, page 168 ) it's working.
> 
> /**
>  * Adds the given tag handler to this tag handler pool, unless this tag
>  * handler pool has already reached its capacity, in which case the tag
>  * handler's release() method is called.
>  *
>  * @param handler Tag handler to add to this tag handler pool
>  */
> public synchronized void reuse(Tag handler) {
> 
> // Releasing Tags, see jsp spec 1.2-fcs, page 172
> handler.release();
> 
> if (current < (handlers.length - 1))
> handlers[++current] = handler;
> }
> 
> Torsten Fohrer
> 
> **
> * DCSI AG* Tel.: +49 7131 155 88-0   *
> * Lessingstrasse 17-19   * Fax.: +49 7131 155 88-99  *
> * D-74076 Heilbronn  * [EMAIL PROTECTED]*
> * GERMANY* http://www.dcsi.de*
> ** 
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>




TagHandlerPool doesn't release Tags on reuse

2002-11-11 Thread Torsten Fohrer

I have some jsp sites which taglibs. With pooling enabled, some problems
occures. 

Samples:

  Customer Registration: all fields have the same values???
  Sessions Values are used together

After reading the jsp spezifikation and source of the
jasper/runtime/TagHandlerPool, i see that the pool doesn't call release in
his reuse method? 

After adding a general release in the reuse methode, which perhaps breaks
the lifecycle of the IterationTag ( see jsp-spec, page 168 ) it's working.

/**
 * Adds the given tag handler to this tag handler pool, unless this tag
 * handler pool has already reached its capacity, in which case the tag
 * handler's release() method is called.
 *
 * @param handler Tag handler to add to this tag handler pool
 */
public synchronized void reuse(Tag handler) {

// Releasing Tags, see jsp spec 1.2-fcs, page 172
handler.release();

if (current < (handlers.length - 1))
handlers[++current] = handler;
}

Torsten Fohrer

**
* DCSI AG* Tel.: +49 7131 155 88-0   *
* Lessingstrasse 17-19   * Fax.: +49 7131 155 88-99  *
* D-74076 Heilbronn  * [EMAIL PROTECTED]*
* GERMANY* http://www.dcsi.de*
** 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: