One way to do is to use lookupdispatch action where each button is assigned it's own method in action class. Do a google search on it or If ya have any books on struts, lookup this action.
Another way to do it is to have a hidden variable set when a user clicks a button. This gets set in the form and you can use that to determine which button was pressed in your action class. --Ron -----Original Message----- From: Maya menon [mailto:[EMAIL PROTECTED] Sent: Monday, June 12, 2006 8:56 AM To: user@struts.apache.org Subject: Best approach All, I have 4 buttons in a jsp. The four should do four different things, with 2 being Submit and Cancel. Is it a good way to write 3 different action classes or just one action class ? Which is a good approach ? Thanks __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]