Re: session close in JSP

From: Herman Timmermans (timmermansdot.hermanat_at_skynet.be)
Date: 12/09/03


Date: Tue, 09 Dec 2003 10:52:49 +0100

megha wrote:

> Hi
>
> I am writing a program in JSP which requires user to log in and as he
> logs in database was updated with his status on and till the user does
> not sign out no other user with same login and password can enter in
> the system. as he signs out database was updated but the problem is if
> somehow he forgot to sign out and closed the browser or navigate to
> other page or site his information was still on in the database. I
> want a solution how to update a database when users forgot to signout
> but closed the window or browser.
> I am using Apache Tomcat ver 4.1.27 with Jsp and SQLServer7.0
>
> Thanks

Hi, I already replied to this in your previous thread. Please do not post
the same question twice under a different heading.
*****************************************
> You should implement the HttpSessionListener interface. In case a session
is invalidated either by a pre-defined time-out or when the user closes his
browser, the sessionDestroyed method is called. Use this method to
clean-up whatever that needs to be done in your database when the user
forgets to do a proper logoff.
Brgds,
Herman
> Megha

-- 
Suse Linux Professional 8.1 on Athlon 1.1 Ghz 512 Mb
Anti Spam = remove the "dot" and the "at"
Registered Linux User #264690


Relevant Pages

  • Re: session end problem in jsp
    ... megha wrote: ... > logs in database was updated with his status on and till the user does ... > but closed the window or browser. ... the sessionDestroyed method is called. ...
    (comp.lang.java)
  • Re: Tables - Cells - Preview Mode
    ... That is where a database driven web site comes into play, ... Thomas A. Rowe (Microsoft MVP - FrontPage) ... > peices when previewed anywhere....in the browser or in ... distributing cells around and ect. ...
    (microsoft.public.frontpage.client)
  • Re: Replication problems
    ... An error occurred while accessing the DHCP database. ... DHCP server event log for more information on this error. ... browser for the domain on transport NetBT_Tcpip_{99B638B5-2C0B. ... master browser is stopping or an election is being forced. ...
    (microsoft.public.windows.server.active_directory)
  • Re: PMJ The REALLY final card list (nearly!)
    ... The url in each link includes a big lump of the database. ... I've had a look back through the server Logs & the File is being ... Maybe it's a Cache prob? ... Sometimes the Browser is getting the File Served up incorrectly. ...
    (uk.people.silversurfers)
  • Re: HTML doc save dialog
    ... After getting the string from database do not set the string to ... > and end html tags. ... In the document complete event of browser, ...
    (microsoft.public.dotnet.languages.csharp)