I would like access properties as well as elements of a bean inherited
from ArrayList.
Can JSTL do that? Apparently, JSTL is interpreting the property name as
an index into the arraylist.
class JeffreyBean extends ArrayList {
public String getName() {
return "Jeffrey";
}
}
<jsp:useBean scope="session" id="bean" class="JeffreyBean"/>
<c:out value="${bean.name}"/>
Chris Riesbeck - 28 Jun 2006 19:11 GMT
> I would like access properties as well as elements of a bean inherited
> from ArrayList.
[quoted text clipped - 10 lines]
>
> <c:out value="${bean.name}"/>
As I read the rules for . and [] in Appendix A.3.4 of the JSTL
specification, it looks like you can't do this. As soon as JSTL sees
that bean is a List, it uses rules for indices, not properties.