Think twice: does your List have a "getSize()" method? NO. Therefore you can't evaluate size with "...telephones.size".
Use this instead: "${! empty branch.telephones}". Victor PS Use List implementations (e.g. ArrayList) instead of Vector. PPS Here's the JSTL treasure chest (just ignore the SQL part): http://www.ibm.com/developerworks/java/library/j-jstl0211.html On Thu, Jul 16, 2009 at 12:19 PM, Juan Diego <juanddpe...@gmail.com> wrote: > > Hi folks! > > I am trying to retrieve the "size" attribute from a Vector for > evaluating if there is data stored in there, but it throws me an > exception when I use "${myvector.size gt 0} why?? > > This is the code > > <c:if test="${branch.telephones.size gt 0}"> > Teléfonos: > <c:forEach var="telephone" items="${branch.telephones}"> > <c:out value="${telephone}" /> > </c:forEach> > </c:if> > [...] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en -~----------~----~----~----~------~----~------~--~---