tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Session lost when app. is redeployed
Date Fri, 27 Mar 2009 02:16:58 GMT
> From: Caldarale, Charles R
> Subject: RE: Session lost when app. is redeployed
> 
> I've finally been able to reproduce your observations, but only by
> touching the .war file itself.

There is a workaround to this problem.  Create a META-INF/context.xml file in your webapp,
with the following content:
<Context>
  <Manager pathname="${catalina.base}/sessions/example.ser"/>
</Context>

(plus whatever else you already have in any existing <Context> element, of course).

This will tell the session manager to store the serialized session data for this webapp in
sessions/example.ser; you can set the path to whatever you want, but all directories in the
path must exist prior to redeploying the webapp.  By keeping the session data outside of the
webapp's work area, the redeployment process will not delete it.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message