When a server serving a session fails and another server handles that session, the session ID of the request becomes invalid. A new session is created that restores all the state and identity information of old session. The sessionRestored
property of the DynamoHttpServletRequest
is set to the old session ID. Thus, when a session ID is invalid in Motorprise, we check sessionRestored
to ensure that it is not a result of this session failover condition.
The properties file of CheckSessionExpiration
at <ATG9dir>Motorprise/config/atg/projects/b2bstore/servlet/
sets the insertAfterServlet
property to /atg/dynamo/servlet/pipeline/SessionSaverServlet
.
This is the CheckSessionExpiration
properties file at <ATG9dir>MotorpriseJSP/j2ee-apps/motorprise/config/atg/projects/b2bstore/servlet/CheckSessionExpiration
:
$class=atg.projects.b2bstore.servlet.WACheckSessionExpiration # Specify where in the servlet pipeline this servlet should appear insertAfterServlet=/atg/dynamo/servlet/pipeline/SessionSaverServlet # Specify the web application registry where Motorprise is registered webAppRegistry=/atg/registry/webappregistry/ServletContextWebAppRegistry # Specify the name under which the Motorprise web app is registered webApplicationName=MotorpriseJSP # Specify the root path (relative to the web app context root) of URLs' # that we should check for session expiration relativeExpirationPath=/ # Specify the URL (relative to the web app context root) that we should # redirect to if an expired session is detected. relativeExpirationURL=/
The property relativeExpirationPath
and relativeExpirationURL
properties of CheckSessionExpiration
are configured to use the URLs relative to the web application’s context root and convert them to absolute URLs at runtime.