I was wondering if anybody could help me with session handling in a Java
Servlet.  Here's the problem that I'm having:

The application that I'm working requires me to be notified when a user
either a) jumps to another webpage or b) closes the browser window.  In
order to do that, I'm using the JavaScript onUnload() function.  When a
user points his/her browser in another direction, the onUnload() tag causes
a new browser window to open up which is pointed to my servlet.  Now, I
need access to the session that was created previous to the user jumping
off my servlet.  However, when I try to call getSession(false) it is
returning null back to me.  Is there any way to keep the session alive?

On a side note, is there any way in Java Servlet programming to determine
whether or not the user is still on your page?  I would like to avoid using
the onUnload() JavaScript function if possible.


Please help,
Raj


----------------------------------
Raj Patel - Software Engineer, Web Technology Group
Sea Change Corporation, 6695 Millcreek Drive, #1, Mississauga, Ont, CANADA,
L5N 5R8

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to