This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Servlets and the fly likes Redirect - 302 or 307 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Redirect - 302 or 307" Watch "Redirect - 302 or 307" New topic
Author

Redirect - 302 or 307

Steve Leach
Ranch Hand

Joined: Sep 24, 2003
Posts: 46
Hi all
I am moving my application to a new host, and every so often I see an "Error 302 Found" page rather than the page I want. This happens when the user sends a POST request and I redirect them to a GET url - I do this after almost every POST, to prevent refreshes from double posting.
I've looked this up and it seems that this is a temporary redirect message, and the browser is NOT supposed to follow it.
It seems to me that I need a 307 redirect code instead.
I'm using response.sendRedirect() - is there anyway to configure this to send a 307 code instead of a 302 ?
Cheers
Steve
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Redirect - 302 or 307
 
jQuery in Action, 3rd edition