Here is the form entries in my struts-config.xml and the code from my action where I attempt to put the objects in the form.
*****struts-config.xml*****
<form-bean
name="personProjectsForm"
dynamic="true"
type="org.apache.struts.action.DynaActionForm">
<form-property name="projects" type="java.util.ArrayList"/>
</form-bean>
<form-bean
name="personIssuesForm"
dynamic="true"
type="org.apache.struts.action.DynaActionForm">
<form-property name="issues" type="java.util.ArrayList"/>
</form-bean>
*****Action*****
public class WelcomeAction extends Action
{
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException,
SQLException, NamingException
{
//Getting user ID
HttpSession session = request.getSession(true);
PersonView user = new PersonView();
user = (PersonView) request.getSession().getAttribute(Constants.USER_KEY);
String userId = user.getPersonUserName();
//Retrieving projects
ArrayList projects = new ArrayList();
projects = ProjectsDB.projects(userId);
((DynaActionForm)form).set("projects", projects);
//Retrieving issues
ArrayList issues = new ArrayList();
issues = IssuesDB.issues(userId);
((DynaActionForm)form).set("issues", issues);
//Forwarding to the appropriate page
return (mapping.findForward(Constants.SUCCESS_KEY));
}
}