This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


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
 
GeeCON Prague 2014
 
subject: Struts 1 : How to get last element using Struts logic iterate.