• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

logic iterate problem

 
Prams Coolkarni
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the Struts forum.

Dave
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic