You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Kalluru Uma. Maheswar" <Ka...@adeasolutions.com> on 2005/02/03 12:42:41 UTC
Avoid resubmit
Hi,
I have a form with a simple text box and a text area. The user enters
some information in the
boxes and presses submit button. The information is inserted into the
database and I show a
confirmation page to the user.
Now when the user refreshes the page, the information is resubmitted
into the database. How
do I avoid this?
I am using
<form-bean name="myForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="subject" type="java.lang.String"/>
<form-property name="summary" type="java.lang.String"/>
</form-bean>
<action path="/myForm"
forward="/test/report.jsp" />
<action
path="/reportForm"
type="test.ReportAction"
name="myForm"
scope="request"
validate="true"
input="/test/report.jsp">
<forward name="success" path="/test/report_thanks.jsp"/>
</action>
Any idea on how to refresh the page but do not submit the data second
time to the database?
Uma
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Avoid resubmit
Posted by Cedric Levieux <jo...@gmail.com>.
By using the Token system
----- Original Message -----
From: "Kalluru Uma. Maheswar" <Ka...@adeasolutions.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Thursday, February 03, 2005 12:42 PM
Subject: Avoid resubmit
Hi,
I have a form with a simple text box and a text area. The user enters
some information in the
boxes and presses submit button. The information is inserted into the
database and I show a
confirmation page to the user.
Now when the user refreshes the page, the information is resubmitted
into the database. How
do I avoid this?
I am using
<form-bean name="myForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="subject" type="java.lang.String"/>
<form-property name="summary" type="java.lang.String"/>
</form-bean>
<action path="/myForm"
forward="/test/report.jsp" />
<action
path="/reportForm"
type="test.ReportAction"
name="myForm"
scope="request"
validate="true"
input="/test/report.jsp">
<forward name="success" path="/test/report_thanks.jsp"/>
</action>
Any idea on how to refresh the page but do not submit the data second
time to the database?
Uma
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org