code: public static ScopedRequest unwrapRequest( ServletRequest request )
      {
          // Unwrap the multipart request, if there is one.
          if ( request instanceof MultipartRequestWrapper )
          {
              request = ( ( MultipartRequestWrapper ) request ).getRequest();
          }
  
          while ( request instanceof ServletRequestWrapper )
          {
              if ( request instanceof ScopedRequest )
              {
                  return ( ScopedRequest ) request;
              }
              else
              {
                  request = ( ( ServletRequestWrapper ) request ).getRequest();
              }
          }
          
          return null;
      }
docs: Unwraps the contained ScopedRequest from the given ServletRequest, which may be a
  ServletRequestWrapper.
  
  @param request the ScopedRequest, or a wrapper (ServletRequestWrapper) around it.
  @return the unwrapped ScopedRequest.
  
  @exclude