Hi Sony,
You can't do this *directly*... Struts stores a single form under a
known request attribute key. This is what the tags will use. Likewise,
struts-config does not allow you to reference two forms for a single
mapping, and likewise it will only populate and pass to your Action a
single ActionForm.
However, there is no problem whatsoever in you creating your own
ActionForm in your Action (although you have responsibility for
populating and validating it in that case) and sticking it into request
under a different key than the default. This is perfectly acceptable.
Just remember, the tags on the page will only use the one under the
default key, you will have to manually access the second one.
Alternatively, you can nest one form within the other. In other words,
have a setter and a getter method in the "main" form so you can store
the second form within it. That way your JSP only deals with a single
form as usual, and you can still use the tags (although the nesting can
be slightly tricky sometimes).
Frank
Sony Thomas wrote:
Hi,
I have to display some values in my JSP from two ActionForms. I set
values to ActionForms from my Action Class. How can I do a mapping for
these two ActionForms and retrieve the values in my jsp.
please help me - bit urgent
thanks sony
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]