You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Laurent Perez <ha...@gmail.com> on 2007/04/20 20:18:52 UTC

Instantiating jsp custom tags outside the tag scope itself ?

Hi

I'm trying to understand if I'm doing something inherently wrong in my
current code, which is working, but which may give me troubles later
on :

I have a custom jsp tag, and instead of writing its rendering logic
inside its doStartTag/doEndTag methods (I'm using JSP 1.2, not 2.x), I
let its doStartTag/doEndTag methods delegate to another class, a
dedicated renderer (I'm passing it the PageContext object, too).

This renderer then instantiantes new tags, like Tag tag = new Tag();
tag.setPageContext(ctx); (...) tag.doStartTag; tag.doEndTag() (...),
basically I have a chain of renderers.

It works, but is there something very, very wrong with this approach ?
My tag usage within my renderer class follows the Tag lifecycle, i.e I
always call tag.recycle(); at the end.

Thanks for any input !
laurent


-- 
<a href="http://in-pocket.blogspot.com">http://in-pocket.blogspot.com
- Mobile world, technology and more</a>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org