Thanks to everyone who replied. I think delegating to other classes from LookupDispatchAction makes sense. That way if more than one form have a submit button that performs the same action(for example, when users press   "cancel"  button on any form, return to main menu), then subclasses of  LookupDispatchAction can reuse the same class.
 
Sunil Narvekar        
 
 

Sunil Narvekar <[EMAIL PROTECTED]> wrote:

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. 

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.

Thanks

Sunil Narvekar

 

  

 

 

 


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
_______________________________________________
Juglist mailing list
[EMAIL PROTECTED]
http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to