Class UrlUtil
java.lang.Object
org.broadleafcommerce.common.util.UrlUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringfixRedirectUrl(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.static StringgenerateUrlKey(String toConvert) static booleanisAbsoluteUrl(String url) Returns true if our current URL is absolute, false otherwise.static voidvalidateUrl(String url, jakarta.servlet.http.HttpServletRequest request) Returns validated URL.
-
Field Details
-
VALID_SCHEME_CHARS
- See Also:
-
redirectPattern
-
-
Constructor Details
-
UrlUtil
public UrlUtil()
-
-
Method Details
-
generateUrlKey
-
fixRedirectUrl
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
Returns true if our current URL is absolute, false otherwise.- Parameters:
url- the url to check out- Returns:
- true if the url is absolute
-