I can get the list count using <c:forEach> as follows, <c:forEach items="${mylist}" var="km" varStatus="cnt"> List Count = ${cnt.count} </c:forEach> Is it possible that i can get this list count directly in the <c:if> test condition without iterating thru <c:forEach>
something like <c:if test="${mylist.count gt 0}"> No data found.. </c:if>
The 'empty' operator is your best bet for comparing to 0. If you really want to get the size however, the JSTL EL function fn:length is your friend (e.g. see JSTL Functions).
Charles Lyons (SCJP 1.4, April 2003; SCJP 5, Dec 2006; SCWCD 1.4b, April 2004)
Author of OCEJWCD Study Companion for Oracle Exam 1Z0-899 (ISBN 0955160340 / AmazonAmazon UK )
You guys haven't done this much, have ya? I suggest you study this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth