/** * Initiates redirect based on the length of the redirection URL. * Chooses between location header redirect or form POST redirect. */ public static void sendRedirect(String redirectUrl, HttpServletResponse response) { // max length of url in ie is 2.083 if (redirectUrl.length() > 2083) { sendFormPostRedirect(redirectUrl, response); return; } sendLocationHeaderRedirect(redirectUrl, response); }