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 2002/08/06 06:47:16 UTC

DO NOT REPLY [Bug 11488] New: - Problem With Tag Pool Reuse Algorithm

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=11488>.
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=11488

Problem With Tag Pool Reuse Algorithm

           Summary: Problem With Tag Pool Reuse Algorithm
           Product: Tomcat 4
           Version: 4.1.8
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Jasper 2
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: craig.mcclanahan@sun.com


Consider a tag <mytags:foo> with a required "id" attribute and two optional
attributes "bar" and "baz".  The following usage pattern will incorrectly
recycle the same tag instance, but not set the attributes correctly:

  <mytags:foo id="abc" bar="123"/>
  <mytags:foo id="abc" baz="456"/>

the second usage will see both "bar" and "baz" set.  Only tag instances that
have the same sets of attributes should be reused -- in the above example, the
attribute sets are different (id/bar versus id/baz) and reuse should not take place.

Interestingly, changing the usage to:

  <mytags:foo id="abc" bar="123"/>
  <mytags:foo id="def" baz="456"/>

(i.e. different values for "id") causes the tag instances not to be reused, so
it appears that the reuse decision is being incorrectly made on attribute values
rather than attribute names.

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