tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Cook" <>
Subject Custom property in a Collection subclass
Date Mon, 11 Nov 2002 17:45:41 GMT
I have a subclass of ArrayList that exposes its own property,

class NamedList extends ArrayList {

	Object _userObject;

	public NamedList(Object userObject) {
		_userObject = userObject;
	public Object getUserObject() {
		return _userObject;

	public void setUserObject(Object userObject) {
		_userObject = userObject;

When I attempt to access the userObject using JSTL (Apache impl), I
receive the following error:

<c:out value="${date.userObject}" />

An error occurred while evaluating custom action attribute "value" with
value "${date.userObject}": The "." operator was supplied with an index
value of type "java.lang.String" to be applied to a List or array, but
that value cannot be converted to an integer.

It seems like the JSTL implementation is treating this call like I meant
${date[userObject}, but surely there is a means to access properties on
a collection class?

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message