tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nitin dubey <nitz_t...@yahoo.com>
Subject <c:forEach> problem
Date Tue, 29 Mar 2005 18:36:41 GMT
Hello,

My JSP code looks like this..

<c:if test="${! empty CONTEXT_STRUCTURE.directories}">
<c:forEach var="directory"
items="CONTEXT_STRUCTURE.directories" >
<tr>
<td width="57%"><c:out value="${directory.name}"
/></td>
<td width="22%">Template</td>
<td width="21%">&nbsp;</td>
</tr>
</c:forEach>
</c:if>


CONTEXT_STRUCTURE will return an Object of class
ContextStructure from the session scope. The sole two
members in ContextStructure class is ArrayList
directories, Arraylist files with its setters and
getters. This ArrayList further has ContextItem class
instances that has properties like name and path with
its setters and getters.

I am getting an exception

Unable to find a value for "name" in object of class
"java.lang.String" using operator "."

when I try to access the name property of the
ContextItem object as in the JSP code.

Could anyone tell me where I am getting wrong ?

Regards,


Nitin Dubey

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message