File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts 1 : How to get last element using Struts logic iterate. 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 » Frameworks » Struts
Bookmark "Struts 1 : How to get last element using Struts logic iterate." Watch "Struts 1 : How to get last element using Struts logic iterate." New topic
Author

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

Chetan Ram
Greenhorn

Joined: Mar 10, 2011
Posts: 20
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 1 : How to get last element using Struts logic iterate.