<c:forEach var="img" items="${imgList}" > <tr> <td> <img /> <!--..............here i want to use hasnext() .............--> </td> </tr> </c:forEach>