Brent is right: You can't have more than one form bean for a given page. However, a possible work-around would be to use "embedded objects" in your form bean. You could, for example have two properties in your form bean: personalDetails and employmentDetails, each of which is a JavaBean containing properties that describe the respective areas. Then in your
JSP, use "dot notation" to identify the properties. Example:
Note: It is a security risk to have a Hibernate controlled object as either a Struts ActionForm bean or an embedded object in a form bean. The reason is that someone could cause an unauthorized update to the database by "spoofing" the page. For example, if you have an Employee bean that is embedded in an ActionForm bean and you have a page that updates something about the employee such as date of hire, a spoofer could create a copy of that page, add "salary" as one of the input fields and succeed in updating the salary in the database.
[ March 13, 2007: Message edited by: Merrill Higginson ]