• Post Reply Bookmark Topic Watch Topic
  • New Topic

get the size of list in jsp  RSS feed

 
shaf maff
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys

If I have a list called:



How can I get its size in JSP ? I tried $(testList.size) but that doesnt work...
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSTL fn:length.

More JSTL tags: http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs
 
Paul Clapham
Sheriff
Posts: 22509
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't ever recall needing to get the length of a List in any of the JSPs I have written. But perhaps you could count the entries as you process them in your JSTL, if you really need to know. Why do you think you need that information?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!