struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick>
Subject Re: Returning data from a ResultSet (via a Collection) to my jsp page ...
Date Thu, 17 Jul 2003 20:34:18 GMT
On Thu, Jul 17,'03 (11:47 AM GMT-0700), Zimmerman, wrote: 

>   My Action page I believe is fine, it is just how to
> > reference it in the jsp.
> > 
<c:forEach var="item" items="${nameOfCollectionInScope}">
 	<c:out value="${item.fieldNameInBeanFromCollection}"/><br>

So, say a Collection of Employee beans called "employees" is in scope...

<c:forEach var="employee" items="${employees}">
 	<c:out value="${}"/><br>
	<c:out value="${employee.address}"/><br>

You can do a similar thing using Struts logic:iterate tag. Plenty of
examples of this floating around.


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

View raw message