Return-Path: Delivered-To: apmail-jakarta-struts-dev-archive@apache.org Received: (qmail 69626 invoked from network); 4 Feb 2003 17:24:45 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 4 Feb 2003 17:24:45 -0000 Received: (qmail 6305 invoked by uid 97); 4 Feb 2003 17:26:15 -0000 Delivered-To: qmlist-jakarta-archive-struts-dev@nagoya.betaversion.org Received: (qmail 6298 invoked from network); 4 Feb 2003 17:26:15 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 4 Feb 2003 17:26:15 -0000 Received: (qmail 68984 invoked by uid 500); 4 Feb 2003 17:24:34 -0000 Mailing-List: contact struts-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list struts-dev@jakarta.apache.org Received: (qmail 68969 invoked from network); 4 Feb 2003 17:24:34 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 4 Feb 2003 17:24:34 -0000 Received: (qmail 51960 invoked by uid 1059); 4 Feb 2003 17:24:32 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 4 Feb 2003 17:24:32 -0000 Date: Tue, 4 Feb 2003 09:24:32 -0800 (PST) From: "Craig R. McClanahan" To: Struts Developers List Subject: Re: DO NOT REPLY [Bug 16749] - Struts EL tag handlers cannot be reused by containers In-Reply-To: <20030204164437.4740.qmail@nagoya.betaversion.org> Message-ID: <20030204091801.T38017@icarus.apache.org> References: <20030204164437.4740.qmail@nagoya.betaversion.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: localhost 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Tue, 4 Feb 2003 bugzilla@apache.org wrote: > > Struts EL tag handlers cannot be reused by containers > It sounds like these tags definitely have a problem. There's been some recent discussion on TOMCAT-USER about designing tags that work reusably as well. The bottom line: * The container can reuse instances of tag handlers when it sees that exactly the same set of attributes is used (not necessarily the same values). * This kind of reuse can happen whether or not the container implements "tag pooling". * When a tag handler instance is reused, the JSP page compiler can decide if it has already set a particular property on that instance, and omit the second set call. For example, in: The second setA() call can be omitted, since the container knows that it already called setA("1") the first time. * If a tag instance is going to be reused, the doEndTag() call on the first use is going to be followed by the doStartTag() call of the second use. Any per-use cleanup activity needs to happen at the end of doEndTag(). * The net effect of all this is an important restriction -- it's not legal for a tag handler to modify the values stored by the setter calls from the page, *anywhere* in the path from doStartTag() through doEndTag(). * The container will call release() after it has used the instance for the last time. Craig --------------------------------------------------------------------- To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-dev-help@jakarta.apache.org