A redirect in a JSP page is implemented with a call to response.sendRedirect() in a scriptlet. Any generated output must not be flushed before this call, otherwise an exception is thrown. String redirectURL = "http://hostname.com/"; response.sendRedirect(redirectURL); %>