I have been trying to figure this out for days with not much luck I have a jsp file with one form in it that has a bunch of values. All those values are handled by 2 ActionForms. I am trying to submit this form and by redirecting from Action 1 to action 2 have those values populate ActionForm 1 and ActionForm 2. Unfortunately only first ActionForm being populated. If I first post to Action#1 than redirect to Action#2 than ActionForm#1 being populated. If I post to Action#2 than redirect to Action#1 than only ActionForm#2 being populated.
Any ideas? I am really stuck!
posted 10 years ago
If the two forms have properties of the same name, just use BeanUtils.CopyProperties() to copy from one to the other. Struts is designed to populate only one form bean on submission, so I don't think you'll have much luck trying to get Struts to populate both of them.