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 2003/11/17 11:22:50 UTC

DO NOT REPLY [Bug 24744] New: - Reuse of BodyTag instances and BodyContent

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24744>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24744

Reuse of BodyTag instances and BodyContent

           Summary: Reuse of BodyTag instances and BodyContent
           Product: Tomcat 4
           Version: 4.1.27
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: bob.news@gmx.net


First: I'm not 100% sure whether this is a bug or a problem of my understanding:

I have two subsequent occurrences of the same BodyTag in a page like this:
<foo:bar>text here</foo:bar>
<foo:bar/>

At runtime due to pooling both tags are handled by the same instance.  When 
doEndTag() is invoked for the second tag, the tag still holds the reference to 
the same BodyContent which still contains the contents "text here" (i.e. it is 
not cleared).  There is no other way to detect this situation as to set a 
flag "hasBody" in doStartTag() to false and set it to true in doInitBody().  Is 
this desired behavior or is it a bug?

Note: This might be related to #17509.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org