Search code examples
javajspstruts

How do I submit multiple models in Struts 2?


I have a JSP that allows users to dynamically create additional form fields to create multiple objects. Perhaps I want to allow users to be able to submit as many line items as they want when submitting an invoice form.

How do I create a Struts 2 Action that will be able to take in an ArrayList populated with objects created from those dynamically generated fields.


Solution

  • You should read the Tabular input guide.