Did you send any content to the HTTP response before using response.sendRedirect()
? To use HTTP Redirect HEADER, you can't send any response to the browser. Even space or line-break/new-line can stop the redirect.
If you've checked all the code and make sure you haven't sent any content to the browser, you can use a JavaScript redirection <script>location.href='yoururl';</script>
. Its not a cool solution, but it works.