java.lang.Object
org.apache.wicket.request.UrlUtils
Various url utilities
- Author:
- igor.vaynberg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisRelative(String url) Checks if the url is relative or absolutestatic StringnormalizePath(String path) Makes sure the path starts with a slash and does not end with a slash.static StringrewriteToContextRelative(String url, IRequestCycle requestCycle) Rewrites a relative url to be context relative, leaves absolute urls same.
-
Constructor Details
-
UrlUtils
protected UrlUtils()Constructor
-
-
Method Details
-
isRelative
Checks if the url is relative or absolute- Parameters:
url-- Returns:
trueif url is relative,falseotherwise
-
rewriteToContextRelative
Rewrites a relative url to be context relative, leaves absolute urls same.- Parameters:
url-requestCycle-- Returns:
- rewritten url
-
normalizePath
Makes sure the path starts with a slash and does not end with a slash. Empty or null paths are normalized into an empty string.- Parameters:
path- path to normalize- Returns:
- normalized path
-