I needed a while until i figured out, how I could create a comma separated list with the Struts 2 Iteration tag. Of course after the last element no comma should appear. I have tried it with the hasNext() method, but somehow could not access the parent iteration. Glad I found the status attribute, which returns an easy to use IteratorStatus. From there you can create such a list pretty easy. Here is a JSON String which holds a list of ActionErrors:
Tags: #Apache Struts #Java