HttpServletRequest httpRequest = (HttpServletRequest) request;
HttpServletResponse httpResponse = (HttpServletResponse) response;
String redirectUrl = buildRedirectUrlToLoginPage(httpRequest,
httpResponse, accessDeniedException);
httpResponse.sendRedirect(httpResponse.encodeRedirectURL(redirectUrl));
}
protected String buildRedirectUrlToLoginPage(HttpServletRequest request,
HttpServletResponse response, AccessDeniedException authException) {