tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lk <>
Subject What's the problem with this <c:foreach>?
Date Tue, 28 Jun 2005 18:09:07 GMT

I have a Collection of Object and I would to iterate through the Collection.

I use this code:

<c:forEach var="fund" items="listoffunds" varStatus="status">
     <c:out value="${}" />
     <c:out value="${status.count}" />

Running the jsp I get this error:

[ServletException in:/inc/box_societa.jsp] An error occurred while 
evaluating custom action attribute "value" with value "${}": 
Unable to find a value for "name" in object of class "java.lang.String" 
using operator "." (null)'

I'm sure the list contains 1 element, and that element has a name.
If I try to use this tag:

     <c:out value="${listoffunds[0].name}" />

I got the name of the fund!

What could be the error?

 --, the professional e-mail, gratis per te:
 la vetrina delle aziende del Canavese industriali, artigianali e di servizi
 Clicca qui:

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

View raw message