Hey!
Not so weird but normal behaviour.
Steve has explained it thoroughly.
Now for a work around.
I am guessing that you do not want it to be reposted on refresh.
You can do this:
resp.setHeader("Pragma", "no-cache");
resp.setHeader("Cache-Control", "no-cache");
resp.setDateHeader("Expires", 0);
This will keep your post from being posted again from a reload (refresh).
See if this works for you. As always, check the archive.
http://archives.java.sun.com/archives/servlet-interest.html
This has been discussed before.
Sans adieu,
Danny
Victor Hadianto wrote:
> Well it's hard to explain my problem on the subject ;-)
>
> Anyway .. I have a bit of problem in my hand here,
>
> 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 ??
>
> Has anyone ever stumble into this small but quite annoying problem? If do
> so, I would really be interested in any tips on how you solve this problem
>
> thanks
>
> vic .
>
> ___________________________________________________________________________
> 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
___________________________________________________________________________
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