response.setStatus(301);Temporary 302 Redirect - Used to send requests to a different location which can be used to handle errors. For example, send someone to your home page when they type in a URL that does not exist on your site.
response.setHeader( "Location", "http://www.example.com/" );
response.setHeader( "Connection", "close" );
response.sendRedirect("/");
No comments:
Post a Comment