Sorry, I left out a paren. Try this:
<c:out value="${fn:length(my_collection)}"/> Yes, you have to import the following: <%@ taglib uri="http://jakarta.apache.org/taglibs/fmt" prefix="fmt" %> BTW, functions are part of JSTL1.1. /robert -----Original Message----- From: draegoon Z [mailto:[EMAIL PROTECTED] Sent: Friday, April 29, 2005 2:22 PM To: user@struts.apache.org Subject: Re: [OT] JSTL + Collection size I tried it, said the syntax is wrong. I didn't see anything about "fn" in the JSTL spec. Where can I find documentation on this? Do I need to import a library? For now, I am just using a c:for loop to count the collection, but this can't be the cleanest way. >From: Robert Taylor <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" <user@struts.apache.org> >To: Struts Users Mailing List <user@struts.apache.org> >Subject: Re: [OT] JSTL + Collection size >Date: Fri, 29 Apr 2005 07:30:49 -0400 > >Size: <c:out value="${fn:length(my_collection}"/> > >draegoon Z wrote: >>Just trying to find the ${my_collection.size} or ${my_collection.length}! >> >>Why is it not that simple? >> >> >> >>--------------------------------------------------------------------- >>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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]