Originally posted by Vishnu Vardhan:
Can I have only one Action Class handling two forms in struts. If yes how could I do it?
Thanks
Vishnu
Why would you like to do that ?
As per strtus standard and even otherwise as best pratice
you should use only one Form in one Action class.
Technically speaking, you can manipulate that by having 2 entries of <action in struts-config.xml and specify same action class but different form for each <action. In execute() of Action, first check type of Form using
instanceof and then proceed accordingly. But you should avoid doing that.
Regards,
Jass