DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=38888>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38888 Summary: Release method for custom tags not called. Product: Tomcat 4 Version: 4.1.31 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Servlet & JSP API AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] (from http://java.sun.com/products/jsp/tutorial/TagLibraries18.html#62842) The tag method invocation sequence is as follows: ATag t = new ATag(); t.setPageContext(...); t.setParent(...); t.setAttribute1(value1); t.setAttribute2(value2); t.doStartTag(); t.doEndTag(); t.release(); Create a tag with one attribute (A) that depends on the initialization of another attribute (B). If B is still null when doStartTag is called, initialize it to a copy of A. Reset B (to null) in the release method. For debugging purposes, the tag should just print out the values of A and B, labeled. Create a test page that calls the tag twice, neither time setting B, but both times setting A to different values ("first time" and "second time", for example). It should print something like the following: first time, first time second time, second time But it will print the following: first time, first time second time, first time Workaround: surround the doStartTag with a try/catch/finally, and call the release method in the finally block. Notes: this is probably platform independant - I've tested on Linux and WinXP. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]