File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Action Form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Action Form" Watch "Action Form" New topic

Action Form

Parijat Mukherjee

Joined: Sep 21, 2003
Posts: 26
Can i use any action form for performing more than one action .
like i have a form manageproject i have 3 actions add , update , delete
now i have a hidden property by which i choose the action class but the problem is in case of add and delete since on sucess as well as failure i return back to same jsp where as i am confused how to put the update entry in struts config
rahul V kumar
Ranch Hand

Joined: May 20, 2003
Posts: 82
DispatchAction class might work for you. You will be having only one action class but different methods each for a specific action. And you can have one ActionForm or DynaActionForm whichever way you want to do it.
Refer to lesson 3 of this link
Hope this helps
Norma Caballero

Joined: Jan 30, 2004
Posts: 27
What we do in the project Im working on, is that we create a BaseAction for each module, this BaseAction has all the methods needed to perform the actions. And then we create an, and and we make calls to the methods created in
I think it doesn't matter if two actions return to the same jsp, you can specify that in struts-config.xml in the forward name tag inside the action entry you specify.
Good luck!
I agree. Here's the link:
subject: Action Form
jQuery in Action, 3rd edition