tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 63898] JSP EL generation is wrong when using newer version of Java 1.8 & tag class uses method overloading and isELIgnored="false
Date Tue, 05 Nov 2019 21:56:07 GMT

Mark Thomas <> changed:

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

--- Comment #1 from Mark Thomas <> ---
TL;DR The JSP specification says that tags should only have one setter per

I've spent some time looking into this an, interestingly, I have seen both
behaviours with Oracle Java 8u172. I'm not sure if using a debugger influenced
the behaviour or if other factors were involved.

Digging into the JavaBeans Introspector code, when there are multiple setters
and no other information to indicate that one should have priority over another
(such as only one having a matching getter) then the first setter found it
used. I suspect what is happening is that the order in which the methods are
returned is varying since the various reflection class to obtain methods don't
specify a return order.

However, all of this is moot due to text present in the JSP specification. The
section numbering seems a little off so if you search for the text
"implication" and then look at the second instance you'll find the following:

The setter methods that should be used when assigning a value to an attribute
of a custom action are determined by using the JavaBeans introspector on the
tag handler class, then use the setter method associated with the property that
has the same name as the attribute in question. An implication (unclear in the
JavaBeans specification) is that there is only one setter per property.

Interestingly, it is only the name that is used to do the matching. The type is
not used.

You are receiving this mail because:
You are the assignee for the bug.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message