This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Clearing up session objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Clearing up session objects " Watch "Clearing up session objects " New topic

Clearing up session objects

Richard John

Joined: Feb 14, 2001
Posts: 8
In my JSP application I'm finding that I am creating a lot of session objects. I'm beginning to get a bit worried about future performance issues by having so many session objects. Is there a neat way to tidy up after myself? Ideally I would like to kill off session objects when a user closes a particular page. Obviously I do realise that when a user logs off or times out the sessions are tidied up by the server.
Thanks for any pointers.
hemanth kumar
Ranch Hand

Joined: Mar 15, 2001
Posts: 55
Hi Jack
u can clear up the session's that u create by using the invalidate() method of the HttpSession object.
Hop above helps
hemanth kumar
Ranch Hand

Joined: Mar 15, 2001
Posts: 55
oops got ur name wrong.Sorry

subject: Clearing up session objects
Similar Threads
How to invalidate session on the basis of session ID in servlet
session timeout and finally method
Viewing a list of all active users
Too many sessions created when running HTTPS port on AIX/Jetty
nice way for Handling session timeouts