added context path to redirect

This commit is contained in:
Mark St. Godard 2005-09-03 21:43:08 +00:00
parent 9d359780d9
commit 486bbee35d
1 changed files with 4 additions and 2 deletions

View File

@ -204,7 +204,8 @@ public class SwitchUserProcessingFilter implements Filter, InitializingBean,
SecurityContextHolder.getContext().setAuthentication(targetUser);
// redirect to target url
httpResponse.sendRedirect(httpResponse.encodeRedirectURL(targetUrl));
httpResponse.sendRedirect(httpResponse.encodeRedirectURL(httpRequest
.getContextPath() + targetUrl));
return;
} else if (requiresExitUser(httpRequest)) {
@ -215,7 +216,8 @@ public class SwitchUserProcessingFilter implements Filter, InitializingBean,
SecurityContextHolder.getContext().setAuthentication(originalUser);
// redirect to target url
httpResponse.sendRedirect(httpResponse.encodeRedirectURL(targetUrl));
httpResponse.sendRedirect(httpResponse.encodeRedirectURL(httpRequest
.getContextPath() + targetUrl));
return;
}