posted 21 years ago
Firstly, if you need to have the union of the controls in the two forms sent to a single action (in this case your servlet), I'd step back from the code for a second and re-evaluate why you have the controls in two separate forms in the first place.
If you come to the conclusion that you have a really good reason for having the two separate forms, there are a number of tactics you can use.
The simplest would be to have the first form contain hidden field controls that mirror the visible controls in the second form. Upon form submission, the values in the visible form fields (in the 2nd form) can be copied via JavaScript to the hidden fields in the first form and thus be submitted to the servlet along with the fields of the first form.
But again, I'd urge you to reflect on your design before putting this kind of mechanism in place to see if it is really necessary in the first place.
hth,
bear