Your form buttons do not have to invoke the same action. Try this
<ul class="formbuttons">
<li><s:submit name="save" action="maintainChangeAction!save"
value="Save" /></li>
<li><s:submit name="cancel" href="otherJsp.jsp" value="Cancel"
/></li>
</ul>
-----Original Message-----
From: abhiram [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 22, 2007 11:30 AM
To: struts forum
Subject: redirect to jsp when cancel button is pressed(without executing
the corresponding action)
Hi!! i have a small problem..
in a particular jsp (which is a form), there is a cancel
button(<html:cancel/>).
i just want to know how to redirect to another page when the cancel
button is pressed (instead of executing the corresponding Action of the
form).
for instance.. there is a page called AddAddress.jsp which contains a
form to add a new address. it has two buttons submit and cancel. now i
dont want the newly entered address to enter the database when i press
'cancel' (which happens when i click 'submit'), and instead i want to
redirect to a different jsp.
how to do this?
thanks,
abhiram
---------------------------------
5, 50, 500, 5000 - Store N number of mails in your inbox. Click here.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]