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]

Reply via email to