| Author |
how to disable session using javascript
|
ashishagarwal agarwal
Greenhorn
Joined: May 04, 2006
Posts: 4
|
|
Hello, I need to expire the session whenever anyone closes the window without signout. I know I can not use java (session) object in javascript functions. Can I use AJAX ? if yes can you send me some sample application? Thankyou Ashish Agarwal
|
 |
Satish SN
Ranch Hand
Joined: Apr 19, 2005
Posts: 70
|
|
Hi Ashish, i think u can handle it through javascript u can write a function on the window close event and call a servlet/jsp through which u can invalidate the user session. try this out i think it should work
|
Satish SN<br />SCJP 1.4 & SCWCD 1.4
|
 |
Mark Spritzler
ranger
Sheriff
Joined: Feb 05, 2001
Posts: 17224
|
posted

0
|
I am going to move this to the Servlets forum, and hopefully that is the best forum for you question. Mark
|
Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56150
|
|
|
There is no way to reliably detect the closing of the browser. Please see the many posts on this topic already in the HTML forum.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
|
This topic is also disussed frequently in this and the JSP forums.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: how to disable session using javascript
|
|
|