code: public void setRequest(ServletRequest request) {
          if (request != null) {
              if (logger.isDebugEnabled()) {
                  logger.debug(String.format("set request: %s", request));
              }
              this.threadLocalRequests.set((HttpServletRequest) request);
          } else {
              //if null, remove from threadLocalRequests
              // @see WindowTask#run 's finally
              if (logger.isDebugEnabled()) {
                  HttpServletRequest tmpRequest = this.threadLocalRequests.get();
                  logger.debug(String.format("remove request: %s", tmpRequest));
              }
              this.threadLocalRequests.remove();
          }
      }
docs: 设置一个请求对象到这个包装器中， {@link PortalRequest} 将把这个请求对象关联给当前线程。
  <p>
  
  这个方法将由web容器(tomcat/resin等)调用