JSTL List Count Using varStatus

JSTL List Count Using varStatus Example explains about finding JSTL List Count Using varStatus

Consider a JSP page, which contains an ArrayList and we need to find the exact count of that particular ArrayList

For this by declaring variable varStatus="status" in JSTL forEach, you can access all the available methods of status object inside JSP page

You can use JSTL 'status.count' for finding the number of elements available on that particular ArrayList.

This JSTL 'status.count' is available for all the List / Collection implementations in java

you can see the below example demonstrating JSTL 'status.count'


Please check the table, You can iterate following table items using c:forEach tag

JSTL foreach Collections

Required Libraries

You need to download

  1. Tomcat 7
  2. JSTL 1.2

Following jar must be in classpath

  1. jstl-1.2.jar

Project Structure

JSTL List Count Using varStatus

1 2 Next

Your email address will not be published. Required fields are marked *