I just iterate through the collection incrementing a temp value to get
the length to solve the problem... Not too efficient I know, but at
least it works... I wouldn't use with large collections for obvious
reasons though.

Best Regards

Mark Starmer

http://www.markstarmer.co.uk

-----Original Message-----
From: Henri Yandell [mailto:[EMAIL PROTECTED] 
Sent: 15 July 2003 15:59
To: Tag Libraries Users List
Subject: Re: how to ask length of collection in JSTL tags



My recommendation is to use the Xephyrus Collections taglib for this. I
don't think JSTL can solve it until JSTL 1.1.

http://www.xephyrus.com/

Hen

On Tue, 15 Jul 2003, Dmitri Ilyin wrote:

> Hi,
>
> how can i get the length(size) of the collection??
> I have a collection in page scope and i'd like to check the length of 
> this collection. I use <c:if test="${collection.length == 1}">
>             that's it
>          </c:if>
> "collection.length" returns always 0. the same with "collection.size"
and
> "collection.itemCount"
>
> HELP!!
>
> thanks a lot
>
> regards
>
> Dmitri
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to