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 2007/08/23 18:23:59 UTC

DO NOT REPLY [Bug 43201] New: - Wrong set method called in custom tag

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

           Summary: Wrong set method called in custom tag
           Product: Tomcat 5
           Version: 5.5.23
          Platform: Other
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Unknown
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: jorge.williams@inl.gov


Suppose we have two custom tags <my:inner>  and <my:outer>.  The body content of
the outer tag is JSP.  The inner tag has an empty content but has an attribute
"isTrue" of type java.lang.Boolean.

In the definition of the inner tag we have two setter methods:

/* method 1 */
public void setIsTrue (Boolean isTrue) { ...  }

/* method 2 */
public void setIsTrue (String isTrueString) { ... }

In a page written using XML Syntax, if I say 

<my:outer>bla bla bla</my:outer> <my:inner isTrue="true" />

Then method 1 is called, as expected...

However, if I say 

<my:outer> <my:inner isTrue="true" /> </my:outer>  

Then method 2 is called instead!  Method 2 should never be called!  I've
deployed the exact same WAR file on Weblogic 9 and there only method 1 is called.   

This seems like a bug to me:  Am I missing something?

Thanx

-- 
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