tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Hartung" <>
Subject Re: more about custam tag life cycle
Date Mon, 03 Feb 2003 20:13:02 GMT
> From: "Felipe Schnack" <>
> Sent: Monday, February 03, 2003 11:11 AM
> Subject: Re: more about custam tag life cycle

>  I'm curious, how you get a PageContext when the container doesn't call
> setPageContext? Which container have this behavior?
>   I don't see a reason why we should have pool-specific method for tag
> property cleaning. doFinally method is intended for tag cleaning...
> Probably when created it was intended for cleaning resources like
> database connections, etc but I don't see any reason to create yet
> another method just for tag reuse

No, the issue was that in some containers, setPageContext was called for
each Tag invocation. So, for some containers you'd get from this code:
<tags:mytag prop1="prop"/>
<tags:mytag prop1="prop2"/>


Tag t = getOrCreateTagFromPool();
t = getOrCreateTagFromPool();

Give the behviour of a tag always have setPageContext called, leads to the
assumption that's it's good point to place "restarting the tag" code.

However, other containers will call setPageContext only once, at the first
invocation, rather than everytime a tag is used. It was either Resin or JRun
as I recall.

It makes sense, why call setPageContext repeatedly as ideally it doesn't
change. It was just something I saw when I was first dealing with this
issue, I tried it out, and boom, there goes that ASS-U-ME thing when I tried
it on a different container.


Will Hartung

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

View raw message