having done profiling in OptimizeIt with tomcat +
JSTL, I can say with confidence it does reuse the
tags.  How do I know?

I've ran profiles with jasper1 and jasper2. With
jasper 1 if I have say 200 tags in a page, it makes
200 tag objects. With jasper2, it makes one of each
tag. So if  have say 20 <c:if> tags in a page, there's
only one.

if you look at the generated source in the working
folder, you'll see this. You can easily verify this by
running 4.0.3 with jasper1 and compare the source
generated. It looks like you're using custom tags
which you've written yourself. Whether your tags are
written to take advantage of tag pooling is another
topic.

peter lin



--- "David M. Karr" <[EMAIL PROTECTED]> wrote:
> I've been following some of the discussions about
> reusing tag handlers, but
> after trying some test cases, I'm having trouble
> with a test case that is
> behaving differently than I expected.  I have a tag
> inside a Struts
> "logic-el:iterate" loop, and all the attributes of
> the tag are plain strings,
> not scriptlet expressions (although one is a JSTL EL
> expression).
> 
> On the first iteration, the setter method is called
> on the attribute.  On the
> second iteration, I would have expected it to reuse
> the original tag handler,
> and NOT call the setter method.  I know it did reuse
> the tag handler, because I
> set a breakpoint in an empty default constructor in
> the tag, and it got there
> on the first iteration, but not on the second
> iteration.  On the second
> iteration, however, it DID call the setter method,
> which I believe, according
> to the specification, should not happen.
> 
> I happen to know that a similar test case run under
> the Resin web container IS
> behaving as I would expect, by NOT calling the
> setter method on the second
> iteration, although I haven't seen the exact test
> case, but I'm pretty sure
> it's ver similar.  I don't have Resin installed.
> 
> Just for completeness, here's the excerpt from my
> jsp page:
> 
> ------------
>      <logic-el:iterate
> collection="${testbean.stringArray}" id="foo"
>                        indexId="ctr">
>       <td>
>        <html-el:text name="testbean"
> property="stringIndexed" value="${foo}"
>                      indexed="true"/>
>       </td>
>      </logic-el:iterate>     
> ------------
> 
> -- 
>
===================================================================
> David M. Karr          ; Java/J2EE/XML/Unix/C++
> [EMAIL PROTECTED]   ; SCJP; SCWCD
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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

Reply via email to