Class RedirectUtil


  • public final class RedirectUtil
    extends java.lang.Object
    Utility for managing redirect based rules
    • Constructor Summary

      Constructors 
      Constructor Description
      RedirectUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String toRedirectURL​(javax.servlet.http.HttpServletRequest request, java.lang.String location)
      Common point to generate a proper "Location" header for redirects.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RedirectUtil

        public RedirectUtil()
    • Method Detail

      • toRedirectURL

        public static java.lang.String toRedirectURL​(javax.servlet.http.HttpServletRequest request,
                                                     java.lang.String location)
        Common point to generate a proper "Location" header for redirects.
        Parameters:
        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)
        Returns:
        the full redirect "Location" URL (including scheme, host, port, path, etc...)