tomcat-taglibs-user mailing list archives

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

My JSP code looks like this..

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

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 ?


Nitin Dubey

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

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

View raw message