Thank you for the reply. 'msgtag' don't have attributes. The other tag
'outtag' have attributes and it is invoked in service method itself . No
tags are nested. But I cannot understand the logic in creating a separate
method call for each tag invocation. In each method it is using same code
other than the retrieved tag instance is assigned to a new variable and
methods are invoked on this. Is there any particular reason for doing this
?. My reason for asking this question is to know and learn how pooling
works.

rgds
Antony Paul

----- Original Message -----
From: "Bill Barker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 30, 2003 11:36 AM
Subject: Re: [OT] custom tags in a page


> Easy question first:  If you don't need BodyTag, don't use it, since it is
a
> potential memory hog.  If you need to process it in a loop, use
IterationTag
> instead. (of course this assumes TC 4.x or higher)
>
> Hard question last:  Without seeing your JSP page, I can't tell you
exactly
> why Jasper chooses to create two methods.  However, popular candidates
are:
> 1) The different calls to 'msgtag' specify different attributes sets.
> 2) One or more of the 'msgtag' invocations  is nested within the body of
> another Tag.
>
> The reason to use method-calls is to (try) and prevent any single method
in
> the resulting .class from exceding 64K (at which point javac pucks :).
>
> "Antony Paul" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to