com.sssw.fw.util
Class EboUrlHelper
java.lang.Object
|
+--com.sssw.fw.util.EboUrlHelper
- public class EboUrlHelper
- extends Object
This class contains URL helper methods.
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
EboUrlHelper
public EboUrlHelper()
removeTrailingSlash
public static String removeTrailingSlash(URL url)
- Returns a string corresponding to the URL, except that if the final character
of the URL is a slash (/), it is removed.
getUrlName
public static String getUrlName(URL url)
- Given an URL, return the last part (the 'name'). Trailing slashes are ignored.
E.g. "http://www.com/northwind/Pages/Page2.html" returns "Page2.html"
"http://www.com/northwind/Pages/" returns "Pages"
getUrlPath
public static String getUrlPath(HttpServletRequest request)
- Returns the full path of an URL servlet request
(e.g. http://localhost/Portal/SilverTrade/home.html)
(e.g. http://localhost/Portal/MySilverTrade)