If you're using a JSP 2.0 container you can use fn:length(<expr>), see http://www.onjava.com/pub/a/onjava/2003/11/05/jsp.html?page=last and http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/fn/length.fn.html
If you're not using a JSP 2.0 container, you can use a taglib in the Jakarta Taglibs sandbox, there's a size tag in the "unstandard" taglib: http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/intro.html. I don't know how well supported the unstandard taglib is, but from what I've found when looking at the source code for Unstandard is that the methods are pretty basic and what I would write, so it saves me writing my own tags. -ed On 3/6/06, Caroline Jen <[EMAIL PROTECTED]> wrote: > I have a Collection called 'remarks'. I can use the > <logic:notEmpty> or <logic:empty> tags to test out if > the Collection has some elements in it or not. > > 1. Is there any tag I can use to test the size value > of that Collection to be zero or greater than zero? > Or I have to use the Java code in my JSP page? > > 2. Is there any tag I can use to output the > > remarks.size(); > > to the browser? > > I simply think that it should not be too much Java > code in a JSP page. > > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "The greatest tyrannies are always perpetrated in the name of the noblest causes." Thomas Paine "Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety" - Benjamin Franklin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]