Title: Message
The proper method for resetting the state of a JSP tag is to re-initialize fields in doEndTag(). The proper method for releasing resources shared across all occurences of the tag (e.g., a JDBC connection) is the release() method. In a couple of instances we put our re-initialization logic in release() instead of doEndTag() and never had a problem in WebLogic or JBoss with Jetty. This showed up as a bug in JBoss with Tomcat because re-used tags were getting the left over state rather than the defaults from the previous usage on that page. It appears that Jetty (and weblogic) are calling a tag's release() method after every occurence of that tag and perhaps creating a new instance rather than using an existing instance for subsequent instances. This can make tomcat look buggy when the bug is actually in your tag.

Reply via email to