response.sendRedirect(response.encodeRedirectURL(uri));
}
} else {
// Until the Servlet API allows specifying the type of redirect to
// use.
Response internalResponse = request.getResponse();
String location = response.encodeRedirectURL(requestURI);
if ("HTTP/1.1".equals(request.getProtocol())) {
internalResponse.sendRedirect(location,
HttpServletResponse.SC_SEE_OTHER);
} else {
internalResponse.sendRedirect(location,
HttpServletResponse.SC_FOUND);
}
}
return false;