you can simply set up a var beforehand with the size of the list. Personally I have always used:
<bean:size id="foo" collection="blah"/> Look at http://jakarta.apache.org/struts/userGuide/struts-bean.html#size for the syntax that will solve your particular case. Now to reference that you can just use ${foo == #} in you EL tests. -Tim -----Original Message----- From: David Chelimsky [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2003 2:36 PM To: Tag Libraries Users List Subject: list size from <c:forEach> Hi. I need to get the size of a list through which I'm iterating via <c:forEach> before the last iteration. While I could add a property to my form bean, I wonder if there's a way to access this from the loop status. >From what I've read, the varStatus attribute of the <c:forEach> tag exposes an instance of LoopStatus, but I can't find any docs on the LoopStatus class. I'm guessing that since <c:forEach> exposes an Iterator, not a List, that this is likely not supported, but I figured it couldn't hurt to ask. Thanks in advance for your advice. David --------------------------------------------------------------------- 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]
