tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felipe Schnack <>
Subject RE: more about custam tag life cycle
Date Mon, 03 Feb 2003 20:56:22 GMT
> >   Yes, but it can be done... to me seems simpler to change 
> > the spec a little than add even more methods (this tends to 
> > create even more confusion IMHO)
> But, to reiterate, there isn't really any kind of useful "cleaning" you
> can do in doFinally that doesn't break the spec in other ways.
  Why? Because doFinally() is meant to be called to handle exceptions? Well,
for this exact reason that we can be sure that it's called every time
after doEndTag()...
> > > >   Tag reusing is so rare to be useful at all? Why?
> > > Well I guess that's the conclusion they came to by JSP 2.0, and the 
> > > rationale behind the SimpleTag interface.
> >   Yes, but I guess it must be hard to know when is good to 
> > pool a tag, 
> > isn't it? :-)
> Only when there is some kind of expensive operation necessary that could
> be done once rather than per-invocation.  For example if you had a tag
> that read a large configuration file that isn't expected to change while
> the appserver is running, you obviously don't want to do that every time
> the tag is called.  But for most simple tags, nothing like that is
> necessary.
  So it's an accepted statement that tag reuse, implemented in Tomcat
4.1.x, isn't very useful in most cases?

> >   My conclusion about my experience and all this debate is 
> > that I should always initialize tag attributes with null, and 
> > reset them in doFinally()...
> You should reset them to null in release, and not change them at all
> anywhere else (except for the setters, of course).
  Hm... so this is standard behavior? release() is called after
doEndTag() in all containers that use pooling?


Felipe Schnack
Analista de Sistemas
Cel.: (51)91287530
Linux Counter #281893

Centro Universitário Ritter dos Reis
Fone/Fax.: (51)32303341

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

View raw message