• Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing variables without getters?

 
Sverre Moe
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When creating a list object with <c:set value="${object.myList}" var="myList"/> how can i access the size of this list?

Using ${myList.size} will not work because the object List does not have a getter for size( the method signature is size() ).

Then how can i access this size value using ${myList}

JSTL 1.1 and JSP 2.0
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Investigate the list of JSTL functions (conventially mapped to fn). You do have the JSTL Spec handy, right?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!