Bug 50408 - Scoped EL variable in methodexpression is treated as Object
Summary: Scoped EL variable in methodexpression is treated as Object
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 7.0.5
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2010-12-03 12:37 UTC by balusc
Modified: 2010-12-03 16:51 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description balusc 2010-12-03 12:37:00 UTC
Consider following example:

  <c:forEach items="${pageContext.response.headerNames}" var="name">
    <c:forEach items="${pageContext.response.getHeaders(name)}" var="value">

The ${name} is a String. The ${name.class.name} also proves that. The getHeaders(name) call however results in:

org.apache.jasper.el.JspELException: /test.jsp(23,12) '${pageContext.response.getHeaders(name)}' java.lang.NoSuchMethodException: org.apache.catalina.connector.ResponseFacade.getHeaders(java.lang.Object)

Another example which also results in NoSuchMethodException which suggests that an Object is been passed as argument:

<c:set var="name" value="test" />

This works all fine on Glassfish v3.
Comment 1 Mark Thomas 2010-12-03 16:51:47 UTC
Thanks for the report and the code snippet. That made reproducing this and generating a test case much easier.

This has been fixed in 7.0.x and will be included in 7.0.6 onwards.