If you are submitting a form, and have a button, I do not see the
reason not to use POST. If you have a link like "Delete Item" in the
list, then I may see that you may be tempted to use GET. At the end it
is up to you, you are the designer. But sometimes it is important to
differentiate between POST and GET. For example, if you have a single
action, which you submit to, and which displays the result, you may
use POST for submit and GET to load the result page. So, if you use
GET to submit, you would not be able to differentiate input from
output. It is another question why would one want to use one action
for input and output.

Here is an example. I have a wizard, which has several pages, and is
controlled by one action. I submit input data to the action using
POST. Action sees that request method is POST, and it accepts input
data and modifies model, then it redirects to itself. So, when it
recieves redirected request, it has GET type and action understands,
that now it has to show the page, corresponding to the wizard. Easy.

Another great thing about using one action is that if you use exactly
same URL, then MSIE and Mozilla do not add pages to page history. This
is great when you modify some data several times. You change some
data, sumbit it, it is wrong, the same page is displayed. Then you
change it, sumbit it, it is wrong, the same page is displayed. You can
do this several times. Then you tired, and you click Back, and you
return from this form immediately, because it was stored in browser
session history only once.

On 5/8/05, rmanchu <[EMAIL PROTECTED]> wrote:
> 
> hi.
> 
> thanx to all who wrote back.
> 
> after having read the replies and links provided i'm going to use the
> Redirect-after-Post method in my app. i would have to craft a dynamic
> Forward with the right params which i think for my needs is a much
> shorter/easier route. thanx to all.
> 
> now i have a different question :)
> 
> all you guys and the articles _seemed_ to stress the POST method for
> form submission. my default is use the GET method if there is no file
> uploads. am i setting myself for a big fall by doing this?

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

Reply via email to