This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Struts and the fly likes logic iterate  problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "logic iterate  problem" Watch "logic iterate  problem" New topic

logic iterate problem

Prams Coolkarni

Joined: Nov 01, 2005
Posts: 12
Hi i just wanted to know is there any method or attribute that can be specified in the logic iterate tag in struts so that one can directly retrive the length of the array or list he or she is iterating using it. i wanted to know this because i want to get the length of the array which is getting iterated directly from the jsp developed using struts
Deepak Tewari

Joined: Aug 04, 2005
Posts: 10
what i suggest the simple way is just initialise a variable outside the logic iterate tag and increment it inside the iterate tag.
U can fix the number of itrations using the length tag but i dont know the other way of knowing the number of iterations before itrating.

Deepak Tewari
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Moving to the Struts forum.

I agree. Here's the link:
subject: logic iterate problem
jQuery in Action, 3rd edition