code:     public static void redirectToSavedRequest(ServletRequest request, ServletResponse response, String fallbackUrl)
              throws IOException {
          String successUrl = null;
          boolean contextRelative = true;
          SavedRequest savedRequest = WebUtils.getAndClearSavedRequest(request);
          if (savedRequest != null && savedRequest.getMethod().equalsIgnoreCase(AccessControlFilter.GET_METHOD)) {
              successUrl = savedRequest.getRequestUrl();
              contextRelative = false;
          }
  
          if (successUrl == null) {
              successUrl = fallbackUrl;
          }
  
          if (successUrl == null) {
              throw new IllegalStateException("Success URL not available via saved request or via the " +
                      "successUrlFallback method parameter. One of these must be non-null for " +
                      "issueSuccessRedirect() to work.");
          }
  
          WebUtils.issueRedirect(request, response, successUrl, null, contextRelative);
      }
  
  