Victor Hadianto <[EMAIL PROTECTED]> wrote:
>Say I have a servlet with a doPost() method. In the HTML form I set my form
>method="post".
>When I click the "submit" button it will call the doPost() method on the
>servlet and change the address on the Web Browser bar to the servlet. The
>servlet then use the Req object to print out the output.
>
>Now my problem is when the user click on the Refresh button on the Web
>Browser. I thought initially if I provide the doGet() method this will be
>called and I can handle this request gracefully. Unfortunately
>InternetExplorer call the doPost() method again.
>
>Isn't that weird ??
No, that is what it is supposed to do (after asking the user to confirm the resend of
the post data). What is the problem? If you don't want this behavior, have your post
method do a sendRedirect (back to the same address, if you like) - which will be taken
as a get.
------------------------------------------------------------------------
Russell Gold | "... society is tradition and order
[EMAIL PROTECTED] (preferred) | and reverence, not a series of cheap
[EMAIL PROTECTED] | bargains between selfish interests."
[EMAIL PROTECTED] | - Poul Anderson, "Iron"
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html