Class RedirectUtil


public final class RedirectUtil extends Object
Utility for managing redirect based rules
  • Constructor Details

    • RedirectUtil

      public RedirectUtil()
  • Method Details

    • toRedirectURL

      public static String toRedirectURL(jakarta.servlet.http.HttpServletRequest request, String location)
      Common point to generate a proper "Location" header for redirects.
      request - the request the redirect should be based on (needed when relative locations are provided, so that server name, scheme, port can be built out properly)
      location - the location URL to redirect to (can be a relative path)
      the full redirect "Location" URL (including scheme, host, port, path, etc...)