code: public synchronized void setRequest(HttpServletRequest request) {
  
          if (perThreadRequest == null) {
              perThreadRequest = new ThreadLocal<HttpServletRequest>();
          }
          perThreadRequest.set(request);
      }
docs: Sets the current request.<p>
  
  @param request the request to set