struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caroline Lauferon" <caroline.laufe...@cgey.com>
Subject Re: forward vs redirect ?
Date Mon, 01 Dec 2003 16:04:50 GMT
> 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


Mime
View raw message