Bug 56147 - Problem Invoking overloaded methods using EL
Summary: Problem Invoking overloaded methods using EL
Status: RESOLVED DUPLICATE of bug 55483
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Servlet & JSP API (show other bugs)
Version: 7.0.42
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2014-02-17 21:35 UTC by ujjets
Modified: 2014-02-24 17:50 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description ujjets 2014-02-17 21:35:54 UTC
Using apache-tomcat-7.0.42 on Windows 7 64bit
Using the below code in JSP :

<c:forEach var="item" items="${listItems }">
    <p>${item.someMethod("h") }</p>

results in:

javax.el.ELException: Cannot convert h of type class java.lang.String to class java.lang.Class

I have the below methods :
       public void someMethod(String x) {

       public void someMethod(Class clz) {
              System.out.println("Class called");
Comment 1 Mark Thomas 2014-02-20 13:15:24 UTC
I've confirmed that this is an issue with the latest 7.0.x trunk but not with 8.0.x.

It should be possible to port the fix from 8.0.x but I need to a) id the right patch and b) confirm that this isn't a side-effect of something that changed in the spec between EL 2.2 and EL 3.0.
Comment 2 Mark Thomas 2014-02-21 12:03:33 UTC
I've found the 8.0.x bug and have back-ported the fix to 7.0.x along with some supporting refactoring.

*** This bug has been marked as a duplicate of bug 55483 ***
Comment 3 ujjets 2014-02-24 17:50:53 UTC
Thank you.