Basically, the suggestion is to send a redirect after processing the form submission. Just set redirect="true" on the forward mapping for the page you show after handling the form.

L.

abhiram wrote:
! thanks for the response.. as i am new to struts, i did not understand the meaning of 
"submit and redirect that will change the URL in the browser and --"

could you xplain a bit more clearly ?

Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote: 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.



      attribute="addressBookForm"
      input="/AddAddress.jsp"
      name="addressBookForm"
      path="/AddressBookAction"
      scope="request"
      type="com.photo.struts.action.AddressBookAction">
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]



---------------------------------
 Once upon a time there was 1 GB storage in your inbox. Click here for happy 
ending.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to