aspose file tools*
The moose likes JSP and the fly likes How to remove the session value... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How to remove the session value... " Watch "How to remove the session value... " New topic
Author

How to remove the session value...

vishnu mohan
Greenhorn

Joined: Feb 01, 2002
Posts: 14
hi, how can i kill all the session value, while the USE CLOSE THE BROWSER. which servlet METHOD i called before closing the browser.
Thanks and regards,Vishnu
ersin eser
Ranch Hand

Joined: Feb 22, 2001
Posts: 1072
Hi Vishnu,
We have a naming policy here at JavaRanch where all publicly displayed names take the form, "Firstname Lastname". Could you please change yours to bring it into line?
Thanks in advance and we hope that you enjoy your stay at the JavaRanch!

ersin
Rajendar Goud
Ranch Hand

Joined: Mar 06, 2002
Posts: 220
Hi vishnu,
u can use the invalidate() method for removing a session.
<% session.invalidate(); %>
Invalidates the session and removes all objects stored within the session.
cheers,
Raj
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Hi,
The javascript event onUnLoad will be called when the browser is closed ..but it is also called when the refresh button is called...
Better set the session time out in web.xml or programmatically using setMaxInactiveInterval of HttpSession i/f so that session is killed after the set interval of inactivity...


Groovy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to remove the session value...