You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Craig R. McClanahan" <cr...@apache.org> on 2003/05/02 18:09:44 UTC

RE: [OT] Struts / JSTL fmt:formatDate / Tomcat 4.1.24 lethal conc oction


On Fri, 2 May 2003, PILGRIM, Peter, FM wrote:

> Date: Fri, 2 May 2003 16:27:33 +0100
> From: "PILGRIM, Peter, FM" <Pe...@rbos.com>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: 'Struts Users Mailing List' <st...@jakarta.apache.org>
> Subject: RE: [OT] Struts / JSTL fmt:formatDate / Tomcat 4.1.24 lethal
>     conc oction
>
>
> > -----Original Message-----
> > From: Joseph Fifield [mailto:jfifield@programmerplanet.org]
> > Sent: 02 May 2003 16:18
> > To: 'Struts Users Mailing List'
> > Subject: RE: [OT] Struts / JSTL fmt:formatDate / Tomcat 4.1.24 lethal
> > concoction
> >
> >
> > > In the JSPC code I see the tag pool is initialised in _jspInit()
> > > and then released in `_jspDestroy()'. Effective the
> > > `Tag.release()' is only called in the `_jspDestroy()'.
> >
> > Exactly. This is all that's guaranteed by the spec. This is
> > explained at
> > http://jakarta.apache.org/taglibs/guidelines.html. Specifically, these
> > points may point to the problem:
> >
> > * release() is not necessarily called between invocations, which means
> > that tag logic should not count on private invocation-specific state
> > being reset by release()
> >
> > * doEndTag() is not necessarily called at the end of every invocation
> > (in cases of abnormal termination -- e.g., an exception
> > thrown inside a
> > tag's body or by one of its methods)
> >
> > * private invocation-specific state is thus best initialized in
> > doStartTag()
>
> When does the Servlet Container call the doStartTag() ?
> Does it set the attributes first, and then call doStartTag() ?
> If so you are buggered. I am pretty sure in my tags than the
> arguments are set first at least in the JDeveloper debugger.
>

The precise order of method invocations depends on whether that tag is a
BodyTag or not.  See the JSP 1.2 Spec, Section JSP.10.1.1, JSP.10.1.2,
JSP.10.2.2 for some helpful state transition diagrams that illustrate
this.  You can get the spec by starting at:

  http://java.sun.com/products/jsp/download.html

Tag instance reuse has been a complex issue for developers.  One of the
interesting features of the new SimpleTag API in JSP 2.0 is that it omits
this feature, and collapses all the action down into calls to the property
setters followed by a call to doTag().

> And if this was so easy, then Standard Tag Lib should be
> easy to edit and fix. So I am not really sure.
>

It'll only be easy if you tell the taglibs-dev list and not us :-).

> --
> Peter Pilgrim,

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org