public class UrlUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static URL |
extractNewUrl(String currentUrl,
String href) |
static String |
getBaseUrl(String url) |
static String |
getVarFromQueryString(String varName,
String haystack)
Retrieve the var value for varName from a HTTP query string (format is
"var1=val1&var2=val2").
|
public static URL extractNewUrl(String currentUrl, String href) throws MalformedURLException
currentUrl - The current urlhref - The target URL, relative or notMalformedURLExceptionpublic static String getBaseUrl(String url)
url - the URL string.Copyright © 2007-2013. All Rights Reserved.