There is always a default session expiry time. This can be overridden by the
servlet. There is no way by which the session can be invalidated if the
browser
is closed. This is not possible using html and servlets alone.

If you want to continuously monitor the user, you have to use an applet
which
"pings" the server at regular intervals or some complex JavaScript and
frames.

The best solution is the simplest solution (for us programmers!). Put as
much
resources as possible into the server and don't worry about session expiry
etc.

or maybe you can implement your own session handling logic using cookies and
a database like oracle. In this case, you can dedicate a set of boxes for
session management alone and can be isolated from the web server.

Is there any third party tool which takes care of these? It would be great
and
save lots of time and effort.

Regards,
Nagaraj.

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Ying Sun
Sent: Wednesday, November 29, 2000 6:58 PM
To: [EMAIL PROTECTED]
Subject: Re: a doubt on sessions


If the servlet doesn't set the session time,when the user close the
browser,the
session will automatically expired.But if the servlet set the session time
say 30
minutes,and user close the brower only in 15 minutes,how to invalidate the
session?which  method to invoke when the user close the browser?

Thanks in advance,
chris

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to