Search code examples
jspstrutsjsp-tagsstruts-1

Using the logic:iterate tag with Struts 1


I am using Struts 1 framework and i have a query regarding the logic:iterate tag.

I have a collection object which stores a list of string objects, i.e Collection(List(String)) c = new ArraList(List(String))()

I am setting the collection object on request scope to be used in my jsp.

Can any one guide me on how to use the logic:iterate tag?


Solution

  • I would say:

    <logic:iterate id="myList" name="yourCollectionInTheRequest">
        <logic:iterate id="myString" name="myList">
            <bean:write name="myString">
        </logic:iterate>
    </logic:iterate>