Package com.logicaldoc.web.util
Class VirtualHostHelper
- java.lang.Object
-
- com.logicaldoc.web.util.VirtualHostHelper
-
public class VirtualHostHelper extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetBaseURL(javax.servlet.ServletRequest request)Gets the base URLstatic StringgetServerURL(javax.servlet.ServletRequest request)Gets the server's URLstatic StringgetServerURL(javax.servlet.ServletRequest request, boolean local)Gets the server's URLstatic StringgetWebAppName(javax.servlet.ServletRequest request)Gets the name of the web application
-
-
-
Method Detail
-
getWebAppName
public static String getWebAppName(javax.servlet.ServletRequest request)
Gets the name of the web application- Parameters:
request- the HTTP request- Returns:
- WebApp name : ie : logicaldoc
-
getServerURL
public static String getServerURL(javax.servlet.ServletRequest request)
Gets the server's URL- Parameters:
request- the HTTP request- Returns:
- Server URL as : protocol://serverName:port/
-
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/
-
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/
-
-