You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2006/03/07 21:23:58 UTC

DO NOT REPLY [Bug 38888] New: - Release method for custom tags not called.

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: blinks@acm.org


(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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 38888] - Release method for custom tags not called.

Posted by bu...@apache.org.
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


blinks@acm.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Additional Comments From blinks@acm.org  2006-03-07 20:26 -------
The JSP page implementation class also guarantees that release will be invoked
on the tag handler ** before the end of the page **.

-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org