|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.nucleus.TimedOperationService atg.servlet.pipeline.PipelineableServletImpl atg.servlet.pipeline.InsertableServletImpl atg.projects.b2bstore.servlet.CheckSessionExpiration atg.projects.b2bstore.servlet.WACheckSessionExpiration
public class WACheckSessionExpiration
A subclass of the CheckSessionExpiration servlet that is aware of web applications and context root issues. Rather than specifying the absolute URL to test for expired sessions and the absolute URL to redirect to when an expired session is detected, this subclass lets you specify URL's relative to the web application's context root and converts these to absolute URL's at runtime. It can therefore detect expired sessions for a web application no matter where that web application is deployed.
To use this servlet you must specify the following properties:
CheckSessionExpiration
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
static java.lang.String |
MY_RESOURCE_NAME
|
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
WACheckSessionExpiration()
|
Method Summary | |
---|---|
protected void |
constructPaths()
Convert relativeExpirationPath and
relativeExpirationURL to absolute values, taking into
account the Web application's context root, and call the superclass
methods to set the corresponding superclass properties. |
protected java.lang.String |
errorMsg(java.lang.String pResourceKey)
Get a formatted error message string based on an error message resource key. |
protected java.lang.String |
errorMsg(java.lang.String pResourceKey,
java.lang.Object pArg)
Get a formatted error message string based on an error message resource key and a single message argument. |
protected java.lang.String |
errorMsg(java.lang.String pResourceKey,
java.lang.Object[] pArgs)
Get a formatted error message string based on an error message resource key and an array of message arguments. |
java.lang.String |
getRelativeExpirationPath()
Return the root, relative to the web application's context path, of the URL's that should be checked for session expiration. |
java.lang.String |
getRelativeExpirationURL()
Return the URL, relative to the web application's context path, that we should redirect to if an expired session is seen. |
java.lang.String |
getWebApplicationName()
Return the name by this web applicaiton is known to the web application registry. |
WebAppRegistry |
getWebAppRegistry()
Return the Dynamo Web Application Registry that knows about the web application whose URL's we are checking for session expiration. |
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Examine the current request to see if the URL matches the criteria for detecting expired sessions and if the session has actually expired, and redirect to a specified URL if necessary. |
void |
setRelativeExpirationPath(java.lang.String pRelativeExpirationPath)
Specify the root, relative to the web application's context path, of the URL's that should be checked for session expiration. |
void |
setRelativeExpirationURL(java.lang.String pRelativeExpirationURL)
Specify the URL, relative to the web application's context path, that we should redirect to if an expired session is seen. |
void |
setWebApplicationName(java.lang.String pWebApplicationName)
Specify the name by this web applicaiton is known to the web application registry. |
void |
setWebAppRegistry(WebAppRegistry pWebAppRegistry)
Specify the Dynamo Web Application Registry that knows about the web application whose URL's we are checking for session expiration. |
Methods inherited from class atg.projects.b2bstore.servlet.CheckSessionExpiration |
---|
getExpirationURL, getSessionExpirationPath, setExpirationURL, setSessionExpirationPath |
Methods inherited from class atg.servlet.pipeline.InsertableServletImpl |
---|
doStartService, getInsertAfterServlet, setInsertAfterServlet |
Methods inherited from class atg.servlet.pipeline.PipelineableServletImpl |
---|
createAdminServlet, destroy, getAdminServlet, getNextServlet, getServletConfig, getServletInfo, init, isUsePathInfo, passRequest, passRequest, service, service, setNextServlet, setServletInfo, setUsePathInfo |
Methods inherited from class atg.nucleus.TimedOperationService |
---|
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface atg.servlet.pipeline.PipelineableServlet |
---|
getNextServlet, passRequest, setNextServlet |
Methods inherited from interface javax.servlet.Servlet |
---|
destroy, getServletConfig, getServletInfo, init, service |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public static final java.lang.String MY_RESOURCE_NAME
Constructor Detail |
---|
public WACheckSessionExpiration()
Method Detail |
---|
public void setWebAppRegistry(WebAppRegistry pWebAppRegistry)
public WebAppRegistry getWebAppRegistry()
public void setWebApplicationName(java.lang.String pWebApplicationName)
public java.lang.String getWebApplicationName()
public void setRelativeExpirationPath(java.lang.String pRelativeExpirationPath)
sessionExpirationPath
property
in the base class by prepending the web app's context root to the
value of relativeExpirationPath
.
public java.lang.String getRelativeExpirationPath()
public void setRelativeExpirationURL(java.lang.String pRelativeExpirationURL)
expirationURL
property in the base class
by prepending the web app's context root to the value of
relativeExpirationURL
.
public java.lang.String getRelativeExpirationURL()
public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
This method simply converts the relative expiration path and expiration
URL properties to absolute URL's (if necessary) and then calls the
superclass service
method to detect and handle expired
sessions.
service
in class CheckSessionExpiration
java.io.IOException
- if an error occurred while reading or writing
the servlet request
javax.servlet.ServletException
- if an error occurred while processing
the servlet requestprotected void constructPaths() throws javax.servlet.ServletException
relativeExpirationPath
and
relativeExpirationURL
to absolute values, taking into
account the Web application's context root, and call the superclass
methods to set the corresponding superclass properties.
javax.servlet.ServletException
protected java.lang.String errorMsg(java.lang.String pResourceKey)
protected java.lang.String errorMsg(java.lang.String pResourceKey, java.lang.Object pArg)
protected java.lang.String errorMsg(java.lang.String pResourceKey, java.lang.Object[] pArgs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |