code: @Override
  	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
  			throws IOException, ServletException {
  		if (!(request instanceof HttpServletRequest)) {
  			super.doFilter(request, response, chain);
  			return;
  		}
  		final HttpServletRequest httpRequest = (HttpServletRequest) request;
  
  		registerSessionIfNeeded(httpRequest);
  		super.doFilter(request, response, chain);
  		// si logout on prend en compte de suite la destruction de la session
  		unregisterSessionIfNeeded(httpRequest);
  	}
docs: {@inheritDoc}