I am using struts framework. I have an ArrayList in the form. I have set the list in the form object and forwarded to the jsp page. If i submit the same page again, does form retain the list object in it?
if so, when it can retain and when can not?
public myForm extends ActionForm
{
private ArrayList myList;
setter and getter goes here...
}
The following is code snippet in action class...
execute(ActionForm form, ActionMapping map, HttpServletRequest req, HttpServletResponse res)
{
MyForm formObj = (MyForm)form;
ArrayList mylist = new ArrayList();
mylist.add("item1");
mylist.add("item2");
return map.findForward("myPage")
}
myPage.jsp
......
......
if i submit this page agian..does form object retains the list in it?
Is there any other case where a form can not retain a ArrayList after submiting?