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>

Reply via email to