You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Lenny Marks <le...@aps.org> on 2002/11/27 02:21:47 UTC

struts-1.1-b2 nested tags don't work with tag handler pooling(tomcat-4.1.12)

The struts-nested tags from struts-1.1-b2 don't work when tag handler pooling
is used. Tomcat 4.1.12 has pooling turned on by default.

This can be demonstrated by deploying the 'MonkeyTree war (milestone two)'
from the Tree Structures tutorial by Arron Bates into tomcat-4.1.12.

Tutorial at:
http://www.keyboardmonkey.com/pilotlight/index.jsp
http://www.keyboardmonkey.com/pilotlight/monkey-tree/wars/monkey-tree_02/monk
ey-tree.war

Make sure pooling is off. See enablePooling in $CATALINA_HOME/conf/web.xml.
Also note that compiled jsp's in the $CATALINA_BASE/work directory must be
removed and server restarted to see new settings take effect.

==============================

*With pooling off:

Monkey Tree
    monkey one
         monkey two
    monkey three
         monkey four

*With pooling on:

Monkey Tree
     monkey one
           monkey two
     monkey one
           monkey two

I haven't checked the struts code, but I think this might be related to Bug
13392(When tag pooling is enabled, release() is not called on tag instances)
in the Apache Bug Database. This ticket ended up 'INVALID' referring to the
semantics of the release() method as defined by JSP.10.1.1.2 (JSP 1.2).
Apparently tags that depend on the release() method to reset state are not
spec compliant.

******* My Question?
Are the struts-nested problems related to the above, and if so, can they be
fixed to be spec compliant, or is their use dependend on deployment within a
servlet container that does not use handler pooling?

The semantics of tag handler reuse seem to be a bit ill-defined. It is well
stated that a tag handler instance can be re-used within the same page
request as well as across page requests. It is not clear whether the
release() method is gauranteed to be called after all reuse within a single
page, or only before the handler is released to the GC(all pages).

See. Web Development with Java Server Pages Second Edition(Manning) pg. 553
which says it will be called after all reuse within a page.

Professional JSP 2nd Edition(Wrox) pg. 301
(After page)

JSP 1.2 Spec - 10.1.1.2(Open for translation)

-------------------------------------------------------


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>