Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 42006 invoked from network); 11 Nov 2002 19:50:19 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 11 Nov 2002 19:50:19 -0000 Received: (qmail 21926 invoked by uid 97); 11 Nov 2002 19:51:12 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 21901 invoked by uid 97); 11 Nov 2002 19:51:11 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 21888 invoked by uid 98); 11 Nov 2002 19:51:10 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: Mon, 11 Nov 2002 11:50:01 -0800 (PST) From: Kin-Man Chung Subject: Re: TagHandlerPool doesn't release Tags on reuse To: tomcat-dev@jakarta.apache.org, tfohrer@t-online.de Reply-to: Kin-Man Chung Message-id: <0H5F007L0GFC04@mpkmail.eng.sun.com> MIME-version: 1.0 X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.4.2 SunOS 5.8 sun4u sparc Content-type: TEXT/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-MD5: MyL8A/36bi2oDfZnbSIWZA== X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Use doStartTag for inits, doEndTag for cleanups. release will be invoked from destroy. > Date: Mon, 11 Nov 2002 20:34:13 +0100 > From: TFohrer@t-online.de (Torsten Fohrer) > Subject: Re: TagHandlerPool doesn't release Tags on reuse > X-Sender: 320014434200-0001@t-dialin.net > To: Tomcat Developers List > 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 > > > Subject: TagHandlerPool doesn't release Tags on reuse > > > To: "'tomcat-dev@jakarta.apache.org'" > > > > > > > > > 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 * tf@dcsi.de * > > > * GERMANY * http://www.dcsi.de * > > > ********************************************************** > > > > > > -- > > > To unsubscribe, e-mail: > > > For additional > > > commands, e-mail: > > > > -- > > To unsubscribe, e-mail: > > For additional commands, > > e-mail: > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > -- To unsubscribe, e-mail: For additional commands, e-mail: