Hi,
use the struts token to avoid multiple form submits or else do something
like submit and re-direct, that will change the URL in the browser and
will not all the same action mapping again.
Thanks,
Nuwan
abhiram wrote:
hi i have a little problem..
i am using struts 1.2. when i refresh the target page of a particular Action,
the Action is being re-executed..
for instance.. i hav a jsp called AddAddress.jsp(which is a form for entering a
new address), a form bean called AddressBookForm and an action called
AddressBookAction.On success of this action, a jsp called AddressBook.jsp
appears(which shows the list of existing addresses,along with the newly added
one).
the problem is that when i click "Refresh" in this(AddressBook.jsp) page, the
newly added address is being added again to the database.. and so the address is being
shown twice in the jsp. i want to avoid this.
this is wat i wrote in my struts-config.xml for the above action.
<form-beans >
<form-bean name="addressBookForm" type="com.photo.struts.form.AddressBookForm"
/>
</form-beans>
<action
attribute="addressBookForm"
input="/AddAddress.jsp"
name="addressBookForm"
path="/AddressBookAction"
scope="request"
type="com.photo.struts.action.AddressBookAction">
<forward name="success" path="/AddressBook.jsp"/>
<forward name="failure" path="/failure.jsp"/>
</action>
i just want 2 know how to stop that re-execution of the action.
please help me out.
thank you.
abhiram
---------------------------------
Why delete messages? Unlimited storage is just a click away.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]