public class UrlUtil extends Object
| Constructor and Description |
|---|
UrlUtil() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
static String |
generateUrlKey(String toConvert) |
static void |
validateUrl(String url,
javax.servlet.http.HttpServletRequest request)
Returns validated URL.
|
public static String fixRedirectUrl(String contextPath, String url)
url - public static void validateUrl(String url, javax.servlet.http.HttpServletRequest request) throws IOException
url - request - IOExceptionorg.owasp.esapi.Validator#isValidRedirectLocation(String, String, boolean),
which only works on relative URLs.
Throws an IOExcption if isValidRedirectLocation is false.Copyright © 2019. All rights reserved.