struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hubert Rabago <>
Subject Re: forward vs redirect ?
Date Mon, 01 Dec 2003 15:37:58 GMT

I use redirect to separate actions which do work and actions which display
Let's say I have 2 pages/Action objects:  DisplayItem, ProcessBid.
The user sees an item he likes (say and enters a bid.  The
bid will get submitted to  Once ProcessBid is finished, it will
redirect to which will show the item and (at this point)
the updated bid amount.  

The advantages are these:
* My "process" action (and any other action which does processing) doesn't need
to chain the display action.
* The user can refresh the resulting page without me having to worry about any
form getting processed twice. (this is a real ebay problem, by the way, and kinda
sucks when you're entering a bid at the last minute and need up-to-the-second
* The url of the resulting page is preserved, allowing the user to bookmark it or
forward it if he so desired.  (Not too helpful for the auction example, but think
about "New Record" processing where you show a page which displays a newly
entered record.)



--- Antony Paul <> wrote:
> Hi,
>     I would like to receive comments on when to use forward and redirect in
> action mapping. Do people use forward only. All the articles and examples I
> saw uses forward.
> Antony Paul.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Do you Yahoo!?
Free Pop-Up Blocker - Get it now

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message