Class UrlUtil

java.lang.Object
org.broadleafcommerce.common.util.UrlUtil

public class UrlUtil extends Object
  • Field Details

  • Constructor Details

    • UrlUtil

      public UrlUtil()
  • Method Details

    • generateUrlKey

      public static String generateUrlKey(String toConvert)
    • fixRedirectUrl

      public static String fixRedirectUrl(String contextPath, String url)
      If the url does not include "//" then the system will ensure that the application context is added to the start of the URL.
      Parameters:
      url -
      Returns:
    • validateUrl

      public static void validateUrl(String url, jakarta.servlet.http.HttpServletRequest request) throws IOException
      Returns validated URL. Validation is done by
      Parameters:
      url -
      request -
      Throws:
      IOException
    • isAbsoluteUrl

      public static boolean isAbsoluteUrl(String url)
      Returns true if our current URL is absolute, false otherwise.
      Parameters:
      url - the url to check out
      Returns:
      true if the url is absolute