Hi Anurag,

Sounds like that when you reset the parameters are being resent, so the action 'add' action is being called again.

Struts has a way of dealing with this situation with a token stored in the submit form, here is a link to an earlier thread:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg68432.html

Apparently there is an example of its use in struts-example.war

--
Jason Lea


Anurag Garg wrote:
Hi All,

I am facing a problem in jsp page refreshing. After submitting the page to
add a new record in the database, I again display the same page with the
added record in the list. Now If I press F5 (I am not clicking the ADD
button) it again adds a new record(duplicate record) in the database, which
it should not do.

I have added the following line in my Action Class
        response.setHeader("pragma","no-cache");

I have also added the following statement in the struts-config.xml
        <controller nocache="true"/>

But still it is adding the duplicate record in the database when i press F5.
Any solution how to overcome this problem..

Thanks and Regards,
Anurag Garg


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






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



Reply via email to