Hi all,
I have created a form which spans multiple
JSP pages, but uses the same form bean each time. The problem is that unless each jsp contains form fields for ALL the data contained within the ActionForm, the data is not passed from JSP page to jsp page. Only the data contained in the most recent page is set, and the other data set previously is overwritten.
Here is a very simple example of what I mean:
----ACTION FORM----
public class CreateSourceProfileForm extends ActionForm {
Profile currentProfile;
public Profile getCurrentProfile() {
return currentProfile;
}
public void setCurrentProfile(Profile newProfile) {
currentProfile = newProfile;
}
}
----JSP 1----
.....
<html:text name="FormName" property="currentProfile.name" />
.....
----JSP 2----
.....
<html:text name="FormName" property="currentProfile.address" />
.....
----ACTION----
.....
Profile p = form.getCurrentProfile();
return mapping.findForward("Page2");
.....
When the form is submitted again from Page 2, the information submitted in Page 1 no longer appears, only the information contained on Page 2. Has anyone any ideas on this? I am not able to pass data in the session, as the actual form spans 10 pages and may take a while to complete. As the data will be accessible by concurrent users, I need to ensure it's integrity.
All advice gratefully received.
Many Thanks,
Pete