given an instance "myInstance" of a class offering the two following methods:
public String getAttributeValue( Identifier attribute ) {...}
and
public String getAttributeValue( ModelAttribute attribute ) {...]
Having an Identifier "myAttribute", I try to invoke the first of these two methods in my JSP:
<h2><c:out value="${myInstance.getAttributeValue(myAttribute)}" /></h2>
The problem: This works perfectly well on my dev-system, yet on the test-system I get an error, saying that an "Identifier" cannot be coerced to a "ModelAttribute".
The EL implementation chooses to call the first method on my machine, but the second method on the test machine.
Both machines are setup with current Java 7 and Tomcat 7 versions.
My question: how does the EL determine which method to call? And do I have a chance of influencing this choice (without providing an additional method)?
Thanks for any hints, Andree