Error in struts tags?

P

plmuon

Hello,

I found something strange in most struts tags (using struts 1.2.4);
maybe my understanding of the JSP spec is wrong, but if not than there
would be an error in many struts tags:

Most struts tags such as html:errors (ErrorsTag) use the Tag.release()
method to reset the attributes to their default state.

However, the description of Tag.release() says:

Called on a Tag handler to release state. The page compiler guarantees
that JSP page implementation objects will invoke this method on all tag
handlers, but there may be multiple invocations on doStartTag and
doEndTag in between.

So, in my understanding, one should reset attributes to their default
state not using the release() method, but by doing so explicitly at the
end of doEndTag so the tag instance is prepared for its next use (in
case it is pooled by the JSP container).

This is confirmed by the following quote from Resing,
http://www.caucho.com/resin-3.0/jsp/tutorial/taglib-reuse/index.xtp:

Resin does not call release() between the first and third <msg:message>
tags. It only calls release() at the end of the page. This behavior
follows the JSP spec, but surprises some tag library developers.


What do you think, do struts tags indeed misunderstand the JSP spec
here?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top