Package com.logicaldoc.web.util
Class BaseURL
- java.lang.Object
-
- com.logicaldoc.web.util.BaseURL
-
public class BaseURL extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getBaseURL(javax.servlet.ServletRequest request)
Gets the base URLstatic String
getLocalBaseURL(javax.servlet.http.HttpServletRequest request)
static String
getServerURL(javax.servlet.ServletRequest request, boolean local)
Gets the server's URLstatic String
getWebAppName(javax.servlet.http.HttpServletRequest request)
Gets the name od the application
-
-
-
Method Detail
-
getServerURL
public static String getServerURL(javax.servlet.ServletRequest request, boolean local)
Gets the server's URL- Parameters:
request
- the HTTP requestlocal
- if the URL must be local- Returns:
- Server URL as protocol://serverName:port/
-
getWebAppName
public static String getWebAppName(javax.servlet.http.HttpServletRequest request)
Gets the name od the application- Parameters:
request
- the HTTP request- Returns:
- WebApp name, i.e.: logicaldoc
-
getBaseURL
public static String getBaseURL(javax.servlet.ServletRequest request)
Gets the base URL- Parameters:
request
- the HTTP request- Returns:
- base URL as protocol://serverName:port/webappName/
-
getLocalBaseURL
public static String getLocalBaseURL(javax.servlet.http.HttpServletRequest request)
-
-