Package de.xima.fc.utils
Class ServletContextInfo
- java.lang.Object
-
- de.xima.fc.utils.ServletContextInfo
-
public final class ServletContextInfo extends Object
Stores info about the servlet container where this app is running.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ServletContextInfo
current()
String
getContextPath()
Map<String,Object>
getInitParams()
String
getRootPath()
String
getServerInfo()
String
getSessionCookieDomain()
int
getSessionCookieMaxAge()
String
getSessionCookieName()
String
getSessionCookiePath()
String
getVirtualServerName()
static void
init(javax.servlet.ServletContext context)
Should be called when this app was initialized on a servlet context.static void
release()
Should be called when the servlet context where this app is running was shut down.
-
-
-
Method Detail
-
getContextPath
public String getContextPath()
-
getRootPath
public String getRootPath()
-
getServerInfo
public String getServerInfo()
- Returns:
- Version info of the servlet container.
-
getSessionCookieDomain
public String getSessionCookieDomain()
-
getSessionCookieMaxAge
public int getSessionCookieMaxAge()
-
getSessionCookieName
public String getSessionCookieName()
-
getSessionCookiePath
public String getSessionCookiePath()
-
getVirtualServerName
public String getVirtualServerName()
-
current
public static ServletContextInfo current()
- Returns:
- Current instance of this servlet context info. When this app is not running on a servlet container, returns an empty info instance.
-
init
public static void init(javax.servlet.ServletContext context)
Should be called when this app was initialized on a servlet context.- Parameters:
context
- Servlet context where this app is running.
-
release
public static void release()
Should be called when the servlet context where this app is running was shut down.
-
-