Fix Tomcat compatibility issue where HttpSession unavailable during "logoff". Thanks to Aaron Tang.

This commit is contained in:
Ben Alex 2004-12-05 05:29:25 +00:00
parent 82ed7253d4
commit 89ba20f057
2 changed files with 3 additions and 2 deletions

View File

@ -92,7 +92,8 @@ public class HttpSessionIntegrationFilter extends AbstractIntegrationFilter {
public void commitToContainer(ServletRequest request, public void commitToContainer(ServletRequest request,
Authentication authentication) { Authentication authentication) {
if (request instanceof HttpServletRequest) { if (request instanceof HttpServletRequest
&& ((HttpServletRequest) request).isRequestedSessionIdValid()) {
HttpSession httpSession = ((HttpServletRequest) request).getSession(); HttpSession httpSession = ((HttpServletRequest) request).getSession();
if (httpSession != null) { if (httpSession != null) {

View File

@ -270,7 +270,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
public boolean isRequestedSessionIdValid() { public boolean isRequestedSessionIdValid() {
throw new UnsupportedOperationException("mock method not implemented"); return true;
} }
public void setScheme(String scheme) { public void setScheme(String scheme) {