Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Tomcat5.5.17 not releasing custom JSP tags ?

Laurent Perez

2006-12-06


Hi

A webapp I'm working on uses custom JSP tags (1.2) under tomcat
5.5.17. I ran into the following problem : custom <b> tag is supposed
to have custom <a> tags as children :

<b><a/><a/></b>

<b> has a addChild(Tag tag) method, doing children.add(tag);
<b> doStartTag() inits its children container : children = new ArrayList();
<a> doStartTag() gives itself to his <b> parent :
((b)getParent()).addChild(this)
both <b> and <a> extend BodyTagSupport

Now, the problem is that the this in addChild(this) always references
the same <a> handler, when I toString() it, it always shows "a@(protected)".
I tried to force a release with super.release() in <a> doStartTag()
but it doesn't help. I disabled tag pooling and it doesn't help.

Is it impossible for a tag to pass itself onto another parent tag ?
Can I only pass attributes or bodycontent between tags, not tags
themselves ?

thanks !

---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.