This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets 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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "logic iterate  problem" Watch "logic iterate  problem" New topic
Author

logic iterate problem

Prams Coolkarni
Greenhorn

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
Greenhorn

Joined: Aug 04, 2005
Posts: 10
Hi,
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
Rancher

Joined: Mar 06, 2001
Posts: 13459

Moving to the Struts forum.

Dave
 
jQuery in Action, 2nd edition
 
subject: logic iterate problem