I have a question regarding information passing from a regular JSP file to Struts 2. Normally, when passing information, I would just create a form with the proper action tag fitting to the action struts 2 will recognize. Then, creating the proper get and set functions along with a private variable on the struts 2 side would properly update all the variables when struts 2 kicks in and performs whatever actions are necessary.
However, I am currently working on a page where the user has the ability to dynamically add and remove various form fields. The id's of these fields are to be dynamically generated. Something along the line of newusername1, newusername2, newusername3 and so forth. As an added twist, there may be holes in-between the sequence, so newusername8 may not exist, but newusername9 will.
But I'm getting ahead of myself - the problem is, I don't know how to properly access values from form fields that are not present statically when the page has been created. How do I, in struts 2, access these values if they're created dynamically?