Search code examples
jspstruts-1

Map a list of names to Form List or Map in Struts 1.2


I ll explain my question with an example. In my JSP page, the form has paired input elements to type first name and last name of employees. There can be many employees. I need to map those first and last names with employees to a List or any Collection in Form bean. The List or any other collection may have value objects having properties 'firstName','lastName'. Is this possible in struts 1.2 ? if possible, how can I do it ? any sample code or useful links would be highly appreciated.


Solution

  • This can be handled in Struts by using indexed and mapped properties.

    See the explanations in the documentation: Indexed Properties, Mapped Properties, and Indexed Tags.