You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Billy Ng <kw...@earthlink.net> on 2003/04/06 22:19:08 UTC
Session won't clear after restart
Hi folks,
I store an object in the session. After I reboot the tomcat and I refresh the browser, the object is still in the session. Why does this happen, is there a way to tell tomcat to clear the session after restart?
Thanks in advance!
Billy Ng
RE: Session won't clear after restart
Posted by Andrew Hill <an...@gridnode.com>.
What about if you call session.invalidate() when they logout?
-----Original Message-----
From: Billy Ng [mailto:kwokng@earthlink.net]
Sent: Monday, 7 April 2003 19:06
To: Tomcat Users List
Subject: Re: Session won't clear after restart
This will work because each window has its own session
This won't work because we can't tell every single user to do it.
I want the user need to re-logon again when the session is gone after
restart
Billy Ng
----- Original Message -----
From: "Kwok Peng Tuck" <pe...@makmal.net>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, April 07, 2003 4:01 AM
Subject: Re: Session won't clear after restart
> Usually closing the browser gets rid of it. Try it and see.
>
>
> Billy Ng wrote:
>
> >So it there a way to enforce tomcat to clear the session after restart?
> >
> >Billy Ng
> >
> >----- Original Message -----
> >From: "Filip Hanik" <ma...@filip.net>
> >To: "Tomcat Users List" <to...@jakarta.apache.org>; "Billy Ng"
> ><ev...@hotmail.com>
> >Sent: Sunday, April 06, 2003 5:07 PM
> >Subject: RE: Session won't clear after restart
> >
> >
> >
> >
> >>Tomcat serializes the sessions and writes them to disk when you shutdown
> >>
> >>
> >the
> >
> >
> >>server.
> >>
> >>Filip
> >>
> >>
> >>
> >>>-----Original Message-----
> >>>From: Billy Ng [mailto:kwokng@earthlink.net]
> >>>Sent: Sunday, April 06, 2003 1:19 PM
> >>>To: Tomcat Users List
> >>>Subject: Session won't clear after restart
> >>>
> >>>
> >>>Hi folks,
> >>>
> >>>I store an object in the session. After I reboot the tomcat and
> >>>I refresh the browser, the object is still in the session. Why
> >>>does this happen, is there a way to tell tomcat to clear the
> >>>session after restart?
> >>>
> >>>Thanks in advance!
> >>>
> >>>Billy Ng
> >>>
> >>>
> >>>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >>
> >>
> >>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Session won't clear after restart
Posted by Jon Wingfield <jo...@mkodo.com>.
I think this is correct but... ;)
In the server.xml config file you will have a Service and an Engine
configured. I think you can put a DefaultContext element in the Engine
which specifies defaults for automatically expanded Contexts. The
Context that Tomcat generates itself probably has a Manager which
handles the session serialisation. Leave that out of your DefaultContext
and you may be in business.
The documentation for the server.xml elements is here:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/index.html
or:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/index.html
depending which version you're running.
HTH,
Jon
Billy Ng wrote:
> I don't use the webapp manager. I am using ant to develop the app. my
> build.xml will shutdown tomcat, delete existing war, copy the new war and
> start tomcat. When I refresh the same page after the above process, I can
> continues to run the app with the same session. The app will not ask me to
> login again.
>
> I notice the tomcat will write a SESSION.ser file in the work directory
> eveytime I stop it. Is it the serialized session file?
> If so, how can I force tomcat not to do it?
>
> Billy Ng
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Session won't clear after restart
Posted by Billy Ng <kw...@earthlink.net>.
I don't use the webapp manager. I am using ant to develop the app. my
build.xml will shutdown tomcat, delete existing war, copy the new war and
start tomcat. When I refresh the same page after the above process, I can
continues to run the app with the same session. The app will not ask me to
login again.
I notice the tomcat will write a SESSION.ser file in the work directory
eveytime I stop it. Is it the serialized session file?
If so, how can I force tomcat not to do it?
Billy Ng
----- Original Message -----
From: "Jan Behrens" <ja...@diekleinedomain.de>
To: "Tomcat Users List" <to...@jakarta.apache.org>; "Billy Ng"
<ev...@hotmail.com>
Sent: Monday, April 07, 2003 5:22 AM
Subject: RE: Session won't clear after restart
> Hi Billy,
>
> not sure whether I understood you right but I think I do basically same to
> cover that problem and it works fine for me... I wonder whether you
actually
> shutdown the service or use the webapp manager to reload your app? Because
> reloading the web through the manager definitely clears my session
> allright....
>
> Regards Jan
>
> > -----Original Message-----
> > From: Billy Ng [mailto:kwokng@earthlink.net]
> > Sent: Monday, April 07, 2003 1:06 PM
> > To: Tomcat Users List
> > Subject: Re: Session won't clear after restart
> >
> >
> > This will work because each window has its own session
> > This won't work because we can't tell every single user to do it.
> >
> > I want the user need to re-logon again when the session is gone after
> > restart
> >
> > Billy Ng
> >
> > ----- Original Message -----
> > From: "Kwok Peng Tuck" <pe...@makmal.net>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Monday, April 07, 2003 4:01 AM
> > Subject: Re: Session won't clear after restart
> >
> >
> > > Usually closing the browser gets rid of it. Try it and see.
> > >
> > >
> > > Billy Ng wrote:
> > >
> > > >So it there a way to enforce tomcat to clear the session after
restart?
> > > >
> > > >Billy Ng
> > > >
> > > >----- Original Message -----
> > > >From: "Filip Hanik" <ma...@filip.net>
> > > >To: "Tomcat Users List" <to...@jakarta.apache.org>; "Billy Ng"
> > > ><ev...@hotmail.com>
> > > >Sent: Sunday, April 06, 2003 5:07 PM
> > > >Subject: RE: Session won't clear after restart
> > > >
> > > >
> > > >
> > > >
> > > >>Tomcat serializes the sessions and writes them to disk when you
shutdown
> > > >>
> > > >>
> > > >the
> > > >
> > > >
> > > >>server.
> > > >>
> > > >>Filip
> > > >>
> > > >>
> > > >>
> > > >>>-----Original Message-----
> > > >>>From: Billy Ng [mailto:kwokng@earthlink.net]
> > > >>>Sent: Sunday, April 06, 2003 1:19 PM
> > > >>>To: Tomcat Users List
> > > >>>Subject: Session won't clear after restart
> > > >>>
> > > >>>
> > > >>>Hi folks,
> > > >>>
> > > >>>I store an object in the session. After I reboot the tomcat and
> > > >>>I refresh the browser, the object is still in the session. Why
> > > >>>does this happen, is there a way to tell tomcat to clear the
> > > >>>session after restart?
> > > >>>
> > > >>>Thanks in advance!
> > > >>>
> > > >>>Billy Ng
> > > >>>
> > > >>>
> > > >>>
> > >
>>---------------------------------------------------------------------
> > > >>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > >>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > > >---------------------------------------------------------------------
> > > >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: Session won't clear after restart
Posted by Jan Behrens <ja...@diekleinedomain.de>.
Hi Billy,
not sure whether I understood you right but I think I do basically same to
cover that problem and it works fine for me... I wonder whether you actually
shutdown the service or use the webapp manager to reload your app? Because
reloading the web through the manager definitely clears my session
allright....
Regards Jan
> -----Original Message-----
> From: Billy Ng [mailto:kwokng@earthlink.net]
> Sent: Monday, April 07, 2003 1:06 PM
> To: Tomcat Users List
> Subject: Re: Session won't clear after restart
>
>
> This will work because each window has its own session
> This won't work because we can't tell every single user to do it.
>
> I want the user need to re-logon again when the session is gone after
> restart
>
> Billy Ng
>
> ----- Original Message -----
> From: "Kwok Peng Tuck" <pe...@makmal.net>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Monday, April 07, 2003 4:01 AM
> Subject: Re: Session won't clear after restart
>
>
> > Usually closing the browser gets rid of it. Try it and see.
> >
> >
> > Billy Ng wrote:
> >
> > >So it there a way to enforce tomcat to clear the session after restart?
> > >
> > >Billy Ng
> > >
> > >----- Original Message -----
> > >From: "Filip Hanik" <ma...@filip.net>
> > >To: "Tomcat Users List" <to...@jakarta.apache.org>; "Billy Ng"
> > ><ev...@hotmail.com>
> > >Sent: Sunday, April 06, 2003 5:07 PM
> > >Subject: RE: Session won't clear after restart
> > >
> > >
> > >
> > >
> > >>Tomcat serializes the sessions and writes them to disk when you shutdown
> > >>
> > >>
> > >the
> > >
> > >
> > >>server.
> > >>
> > >>Filip
> > >>
> > >>
> > >>
> > >>>-----Original Message-----
> > >>>From: Billy Ng [mailto:kwokng@earthlink.net]
> > >>>Sent: Sunday, April 06, 2003 1:19 PM
> > >>>To: Tomcat Users List
> > >>>Subject: Session won't clear after restart
> > >>>
> > >>>
> > >>>Hi folks,
> > >>>
> > >>>I store an object in the session. After I reboot the tomcat and
> > >>>I refresh the browser, the object is still in the session. Why
> > >>>does this happen, is there a way to tell tomcat to clear the
> > >>>session after restart?
> > >>>
> > >>>Thanks in advance!
> > >>>
> > >>>Billy Ng
> > >>>
> > >>>
> > >>>
> > >>---------------------------------------------------------------------
> > >>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > >>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >>
> > >>
> > >>
> > >
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> > >
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Session won't clear after restart
Posted by Billy Ng <kw...@earthlink.net>.
This will work because each window has its own session
This won't work because we can't tell every single user to do it.
I want the user need to re-logon again when the session is gone after
restart
Billy Ng
----- Original Message -----
From: "Kwok Peng Tuck" <pe...@makmal.net>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, April 07, 2003 4:01 AM
Subject: Re: Session won't clear after restart
> Usually closing the browser gets rid of it. Try it and see.
>
>
> Billy Ng wrote:
>
> >So it there a way to enforce tomcat to clear the session after restart?
> >
> >Billy Ng
> >
> >----- Original Message -----
> >From: "Filip Hanik" <ma...@filip.net>
> >To: "Tomcat Users List" <to...@jakarta.apache.org>; "Billy Ng"
> ><ev...@hotmail.com>
> >Sent: Sunday, April 06, 2003 5:07 PM
> >Subject: RE: Session won't clear after restart
> >
> >
> >
> >
> >>Tomcat serializes the sessions and writes them to disk when you shutdown
> >>
> >>
> >the
> >
> >
> >>server.
> >>
> >>Filip
> >>
> >>
> >>
> >>>-----Original Message-----
> >>>From: Billy Ng [mailto:kwokng@earthlink.net]
> >>>Sent: Sunday, April 06, 2003 1:19 PM
> >>>To: Tomcat Users List
> >>>Subject: Session won't clear after restart
> >>>
> >>>
> >>>Hi folks,
> >>>
> >>>I store an object in the session. After I reboot the tomcat and
> >>>I refresh the browser, the object is still in the session. Why
> >>>does this happen, is there a way to tell tomcat to clear the
> >>>session after restart?
> >>>
> >>>Thanks in advance!
> >>>
> >>>Billy Ng
> >>>
> >>>
> >>>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >>
> >>
> >>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Session won't clear after restart
Posted by Kwok Peng Tuck <pe...@makmal.net>.
Usually closing the browser gets rid of it. Try it and see.
Billy Ng wrote:
>So it there a way to enforce tomcat to clear the session after restart?
>
>Billy Ng
>
>----- Original Message -----
>From: "Filip Hanik" <ma...@filip.net>
>To: "Tomcat Users List" <to...@jakarta.apache.org>; "Billy Ng"
><ev...@hotmail.com>
>Sent: Sunday, April 06, 2003 5:07 PM
>Subject: RE: Session won't clear after restart
>
>
>
>
>>Tomcat serializes the sessions and writes them to disk when you shutdown
>>
>>
>the
>
>
>>server.
>>
>>Filip
>>
>>
>>
>>>-----Original Message-----
>>>From: Billy Ng [mailto:kwokng@earthlink.net]
>>>Sent: Sunday, April 06, 2003 1:19 PM
>>>To: Tomcat Users List
>>>Subject: Session won't clear after restart
>>>
>>>
>>>Hi folks,
>>>
>>>I store an object in the session. After I reboot the tomcat and
>>>I refresh the browser, the object is still in the session. Why
>>>does this happen, is there a way to tell tomcat to clear the
>>>session after restart?
>>>
>>>Thanks in advance!
>>>
>>>Billy Ng
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Session won't clear after restart
Posted by Billy Ng <kw...@earthlink.net>.
So it there a way to enforce tomcat to clear the session after restart?
Billy Ng
----- Original Message -----
From: "Filip Hanik" <ma...@filip.net>
To: "Tomcat Users List" <to...@jakarta.apache.org>; "Billy Ng"
<ev...@hotmail.com>
Sent: Sunday, April 06, 2003 5:07 PM
Subject: RE: Session won't clear after restart
> Tomcat serializes the sessions and writes them to disk when you shutdown
the
> server.
>
> Filip
>
> > -----Original Message-----
> > From: Billy Ng [mailto:kwokng@earthlink.net]
> > Sent: Sunday, April 06, 2003 1:19 PM
> > To: Tomcat Users List
> > Subject: Session won't clear after restart
> >
> >
> > Hi folks,
> >
> > I store an object in the session. After I reboot the tomcat and
> > I refresh the browser, the object is still in the session. Why
> > does this happen, is there a way to tell tomcat to clear the
> > session after restart?
> >
> > Thanks in advance!
> >
> > Billy Ng
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: Session won't clear after restart
Posted by Filip Hanik <ma...@filip.net>.
Tomcat serializes the sessions and writes them to disk when you shutdown the
server.
Filip
> -----Original Message-----
> From: Billy Ng [mailto:kwokng@earthlink.net]
> Sent: Sunday, April 06, 2003 1:19 PM
> To: Tomcat Users List
> Subject: Session won't clear after restart
>
>
> Hi folks,
>
> I store an object in the session. After I reboot the tomcat and
> I refresh the browser, the object is still in the session. Why
> does this happen, is there a way to tell tomcat to clear the
> session after restart?
>
> Thanks in advance!
>
> Billy Ng
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org