I have a JSP form with three submit buttons on it such as�Update, Delete and Abort.
I created struts action classes .. UpdateAction, DeleteAction and AbortAction with an execute() method in each of them which performs the necessary action.
How do I setup the struts configuration file, so that each time I press a submit button, it performs the intended action. For example, when Update button is pressed - invoke UpdateAction's execute() > method.
I know one way of doing this is by using the org.apache.struts.actions.LookupDispathAction class. It requires you to write one class with multiple methods(for example update(), delete() and abort()), where one of the methods will be invoked based on value of a special request parameter sprcified in the configuration file.�
As the @author of LookupDispatchAction, I guess I am obligated to respond here. You could delegate to other classes from that one if you wanted and not put the actual logic executed there.
What if I do not want to combine the several actions in one class, but have one action class for each submit button on the JSP page?. Please let me know if anyone has done this. This is my first Struts project.
Or you could use DispatchAction or some custom variant of that approach.
Struts really is all about a single entry point from a form, so you'll need to have a single action if its a single <form> - but there are many ways to do it.
Erik
_______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org
