struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claire Wall" <claire.w...@kurtosys.com>
Subject Re: forward vs redirect ?
Date Mon, 01 Dec 2003 16:44:12 GMT
caroline,

when the user gets to page2, what is the url displayed in the address box?
is it the action or the jsp page?


claire

----- Original Message -----
From: "Caroline Lauferon" <caroline.lauferon@cgey.com>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Monday, December 01, 2003 4:04 PM
Subject: Re: forward vs redirect ?


> > For example, say i had an action which saved some details from a form to
a
> > database. if the page is not redirected then if the user were to refresh
> the
> > page, the action would be called again and the data saved again. This
> > obviously i would not want the user to do so in this case i redirect the
> > page, so that if the user were to refresh the page, the save action
would
> > not be called again.
>
> I'm not sure I understand what you mean. The case you describe is very
close
> to mine, and so I would like to prevent the user from making twice the
> addition on refresh:
> I've got one first form, Form1, which calls Action1:
> <action path="/action1" name="Form1" type="actions.Action1"
scope="session"
> input="/form1.jsp">
>     <forward name="ok" path="page2.jsp" redirect="true"/>
> </action>
>
> but once the user is on page2, if he makes a refresh, action1 is called
> again.... and the data added by action1 is added once more....
>
> What didn't I understand?
> Thanks
> Caroline
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message