Java Mailing List Archive

http://www.junlu.com/

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

[OT] custom tags in a page

Antony

2003-12-29

Replies:

Hi,
I wrote two custom tags. One is used only once in the page(msgtag) while
the other one is used multiple times(outtag) similar to JSTL c:out. Both
classes extends BodyTagSupport. When I looked at the compiled servlet code
both tags are called in different ways. Each use of msgtag is made a method
call. If I put 2 msgtag(both are exacly same) in JSP it creates 2 methods.
outtag is invoked directly in servlet.
Why the difference ?.
Is this behavior can be controlled through coding ?.
Which one is better ?.
Why Tomcat is creating one method per each tag invocation.? Why not manage
it like an object. Each time it is getting an instance from a pool ?

BTW Extending TagSupport or BodyTagSupport is better. I have no need to
process the body ? Any performance gain ?

rgds
Antony Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



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