Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL size of collection

 
Tom Henricksen
Author
Ranch Hand
Posts: 144
5
Eclipse IDE jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to get the size of a collection?



This seems quite common and I have seen some old questions on it that say we must use a scriptlet to do this.
Thanks,
Tom
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65228
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What version of JSP are you using and what version of the JSTL? This is always important info to include with these types of questions.

If your answer is JSP 2.0/JSTL 1.1, then you can use the JSTL fn:length function:


[ December 12, 2005: Message edited by: Bear Bibeault ]
 
Tom Henricksen
Author
Ranch Hand
Posts: 144
5
Eclipse IDE jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear I will give that a try.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65228
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be sure to declare the fn namespace on your page.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic