| Author |
How to Manage HttpSession with inactive time period?
|
Amanda Mosby
Greenhorn
Joined: Apr 05, 2012
Posts: 2
|
|
In the following post , i found about how to mantain session objects
http://www.coderanch.com/t/365859/Servlets/java/session-object-session-ID
specifically
how to use this in my own servlet, how to setHttpSession and getHttpSession
each time i have a new request on my servlet
and how will remove it if the session from the map when its no longer in use again
so is there auto timer for each session, so that it get deleted automatically from the hashmap,
when the given time period is reached and its no longer used by my servlet/server application
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56163
|
|
Your terminology is off. You are not adding or removing "sessions". There is only one session available to your servlet, and you are adding and removing "scoped variables", also called "attributes", to it.
I'm not really understanding what your question is. You can add or remove scoped variables to the session any time you like. All scoped variables in the session will automatically be removed if the session times out.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: How to Manage HttpSession with inactive time period?
|
|
|