You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Viral_Thakkar <Vi...@infosys.com> on 2003/12/09 12:47:27 UTC

Refresh -submit relation

I have a page for upload functionality which uploads the files to a
folder.

Here I am referring the struts example for uploading of files and I am
inserting the record in table at the same time.

This upload is working fine but problem is when I refresh the browser
page, the page is getting submitted again. Due to this duplicate records
are inserted in the database.

Is there any way, to stop the page to submit on refresh?





---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Refresh -submit relation

Posted by Gurpreet Dhanoa <gu...@smartdatainc.com>.
Hi

You need to use the concept of saveTokens Which prevent yoyr form from
getting submitted twice

Cheers
gary

----- Original Message -----
From: "Viral_Thakkar" <Vi...@infosys.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, December 09, 2003 5:17 PM
Subject: Refresh -submit relation


> I have a page for upload functionality which uploads the files to a
> folder.
>
> Here I am referring the struts example for uploading of files and I am
> inserting the record in table at the same time.
>
> This upload is working fine but problem is when I refresh the browser
> page, the page is getting submitted again. Due to this duplicate records
> are inserted in the database.
>
> Is there any way, to stop the page to submit on refresh?
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Refresh -submit relation

Posted by Jeff Kyser <kt...@comcast.net>.
Investigate the use of tokens, also search the archives,
as this is a commonly discussed problem.

-jeff

On Tuesday, December 9, 2003, at 05:47  AM, Viral_Thakkar wrote:

> I have a page for upload functionality which uploads the files to a
> folder.
>
> Here I am referring the struts example for uploading of files and I am
> inserting the record in table at the same time.
>
> This upload is working fine but problem is when I refresh the browser
> page, the page is getting submitted again. Due to this duplicate 
> records
> are inserted in the database.
>
> Is there any way, to stop the page to submit on refresh?
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org