• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 1 : How to get last element using Struts logic iterate.

 
Chetan Ram
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to struts.

I have an arraylist which contains beans

i.e. ArrayList --->
bean1 -- name, dept
bean2 -- name, dept
bean3 -- name, dept
bean4 -- name, dept

I want to iterate over the arraylist and print them comma separated.

I must put "," after every element expect last element.
Currently, I am using <logic:iterate>.



Can any one please let me know how to get last element?

Thanks,
Chinnu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic