Thursday, May 23, 2002 06:21 PM
You can specify a new location for the refresh, and if you do so, the browser must submit the request using the GET method (or at least, must do so to be compliant with the HTTP spec, but that's another story). Since GET is guaranteed to be safe and idempotent, the browser will not have to ask the user before submitting the request. Just make sure that your
doGet(...) method actually is safe and idempotent (see RFC 2616, Section 9.1).
My understanding from your question is that you are using the same servlet to handle both requests. If this is true, just specify the same location for the refresh header and the browser will submit using GET, dropping all POST data (not changing it to a GET query string). This means that the POSTed data will not be available on the second request, so you will have to use some other means of identifying the user (i.e. HttpSessions or pass some identifier as a parameter in a "manually created" GET query string).
Also, I highly recommend that you replace your