I'm using GAE with Java servlets. I have a form POST request, and I have to redirect the browser to a new location with GET method. How can I do this?
+2
A:
I got solution:
http://en.wikipedia.org/wiki/Post/Redirect/Get
This is my code sample:
private void seeOther(HttpServletResponse resp, String pathOfOtherToSee)
{
resp.setStatus(HttpServletResponse.SC_SEE_OTHER);
resp.setHeader("Location", pathOfOtherToSee);
}
Eonil
2010-07-02 12:50:42
Yup, that's pretty much the standard way. Would you care to show us the code to do this w/ Java servlet?
Piskvor
2010-07-02 13:30:48
Added code sample. I wish this helps.
Eonil
2010-07-02 14:34:59