This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JSP and the fly likes Get collection size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Get collection size" Watch "Get collection size" New topic
Author

Get collection size

Otilia Marcu
Greenhorn

Joined: Jan 19, 2006
Posts: 4
Any ideea about how to get collections size in JSTL?

<cut value="${map.numberOfItems}"/> seems not dooing good work ....


What is the right way?


chamade76
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63227
    
  69

If using JSP 2.0 and JSTL 1,1:

${fn:length(whatever)}


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Get collection size
 
It's not a secret anymore!