On 4/8/07, Christopher Schultz <[EMAIL PROTECTED]> wrote:
This issue has already been identified as "not an issue". If you read
the original post, you'd see that I was, in fact, using redirects after
non-cleanly-repeatable operations. :(
Ok, I was guessing that there might probably be an HTTP Forward in the
code that may be causing the re-post. But I'm happy it's solved :-)
HTTP forward should return HTTP 3xx, not 200. Are you sure you're seeing
what you think you are?
I wasn't sure so, I tested this on Firefox with the "Tamper Data"
extension, it is similar to "Live HTTP Headers" but I find Tamper Data
a little less confusing to look at.
Anyway, upon testing with both Http Redirect and Http Forward ---- the
forward returned a Status Code of 200
Here's a snapshot of the test:
--------------------------------------
HTTP Redirect
response.sendRedirect("/p/test68/formMethodGet.jsp");
--------------------------------------
Status Code 200 URL=http://practice:9090/p/test68/formMethodGet.jsp
Status Code 302
URL=http://practice:9090/TestPostServlet?testInputField=test&submit=submit
--------------------------------------
HTTP Forward
RequestDispatcher rd =
getServletContext().getRequestDispatcher("/p/test68/formMethodGet.jsp");
rd.forward(request,response);
--------------------------------------
Status Code 200 URL=http://practice:9090/p/test68/formMethodGet.jsp
Status Code 200
URL=http://practice:9090/TestPostServlet?testInputField=test&submit=submit
The above behavior of Http Forward is in accordance with what most
sites describe it's behavior:
http://www.javapractices.com/Topic181.cjp
4. Choosing Between Forward and Redirect
http://www.oreillynet.com/pub/a/oreilly/java/news/jsptips_1100.html
So I was thinking that somewhere in the code there's probably an HTTP
Forward that is causing the data to be re-posted on refreshing the
browser.
-Rashmi
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]