List iteration in Struts2

I’ve a list in action class and I want to iterate it in JSP. I’m trying like this.

In action class:

 sheets = new ArrayList<Sheet>();
  {//some loop  
    sheet=new Sheet();      
    sheet.setType("S.L");
    sheet.setJan("1");
    sheets.add(sheet);
  }

Sheet class is full of setter and getter methods.

In JSP:

 <s:iterator value="sheets">
 <s:property value="type" />
 ..........................
 </s:iterator>

But there is no outout.


Source: jsp

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.