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
Joined: May 20, 2003
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 http://www.reumann.net/do/struts/main Hope this helps
Joined: Jan 30, 2004
Hi, 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 AddAction.java, DeleteAction.java and UpdateAction.java and we make calls to the methods created in BaseAction.java 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!