tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Mulder <>
Subject Forcing a new session
Date Thu, 12 Oct 2000 00:56:35 GMT
	I'm deploying Sun's J2EE Pet Store demo on Tomcat.  One of the
problems I've run into is that when you log out, it calls invalidate() on
the session, then immediately calls getSession(true) on the request,
expecting a new session to be generated.  This blows up in Tomcat (3.2
CVS), since the invalidated session is still in the
RequestImpl.serverSession instance variable, so it gets returned.
	I'm not sure whether this is a problem with Tomcat or with the Pet
Store.  You can fix it in Tomcat by adding a block like:

try {
    return serverSession;
} catch(IllegalStateException e) {}

	to RequestImpl.getSession(), but this is not so nice.  Is there
another way to forcibly generate a new session?  Or a better patch to
clear out the invalidated one?


View raw message