code: public static GrailsWebRequest retrieveGrailsWebRequest() {
          RequestAttributes attributes = RequestContextHolder.currentRequestAttributes();
          if(attributes instanceof GrailsWebRequest) {
              return (GrailsWebRequest)attributes;
          }
          return null;
      }
docs: Returns the GrailsWebRequest associated with the current request.
  This is the preferred means of accessing the GrailsWebRequest
  instance. If the exception is undesired, you can use
  RequestContextHolder.getRequestAttributes() instead.
  @throws IllegalStateException if this is called outside of a
  request.