struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <david.k...@wamu.net>
Subject RE: Struts tags / JSTL question
Date Sat, 25 Dec 2004 00:36:34 GMT
Did you try "${collection[0]}"?

> -----Original Message-----
> From: Vinicius Caldeira Carvalho 
> [mailto:vinicius.carvalho@squadra.com.br] 
> Sent: Thursday, December 23, 2004 10:15 AM
> To: Struts Users Mailing List
> Subject: Struts tags / JSTL question
> 
> 
> Hi there!
> I have a collection of beans, and this collection is set to 
> the request. 
> I'd like to retreive only the first object of the collection 
> (later on 
> I'll iterate over it completely) How can I do this? My 
> Collection is a List. I tried <c:set var="bean" 
> value="${collection.get(0)}"> and also <c:set var="bean" 
> value="{$collection.iterator.next}">
> 
> none of 'em seems to work. Any ideas?
> 
> Thanks all
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 

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


Mime
View raw message