code: @Override
      public void doFilter(ServletRequest request, ServletResponse response,
                           FilterChain chain) throws ServletException, IOException {
          HttpServletRequest req = (HttpServletRequest)request;
          HttpServletResponse resp = (HttpServletResponse)response;
          RequestContext context = createRequestContext(req, resp);
          String threadName = Thread.currentThread().getName();
  
          logger.debug(LOG_KEY_BINGING_CONTEXT, req.getRequestURI(), threadName);
  
          RequestContext.setCurrent(context);
  
          try {
              chain.doFilter(request, response);
          } finally {
              logger.debug(LOG_KEY_UNBINDING_CONTEXT, req.getRequestURI(), threadName);
  
              RequestContext.clear();
          }
      }
docs: Binds a new {@link RequestContext} to the current thread, and after the the filter chain has finished
  executing, removes it from the current thread.
  
  @param request
  @param response
  @param chain