title: How to return a ArrayList incase of Struts2 Action class execute method?
body: <p>I have a question  with respect to returning data inside Struts2 .
  Inside my Action class as shown below , i am getting the Records and setting them inside ArrayList .</p>
  
  <p><strong>But could anybody please tell me , how can i return the Obtained ArrayList to the JSP Page ? because with the syntax of the Action class execute method , it allows us to return only a String ?</strong></p>
  
  <pre><code>public class DBDisplay extends ActionSupport{
  private String name ;
  List list = null;
  
  public String execute() throws Exception
  {
  list = DBClass.getInstance().list();
  Iterator it = list.iterator();
  while(it.hasNext())
  {
  name = (String) it.next();
  }
  setName(name);
  }
  public String getname()
  {
  return name;
  }
  public void setName(String name)
  {
  this.name = name;
  }
  
  }
  </code></pre>