struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Reumann...@reumann.net>
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>
</c:forEach>

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

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

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

-- 
Rick



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


Mime
View raw message