aspose file tools*
The moose likes Servlets and the fly likes Not recieving sessionDestroyed on Browser close 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 » Servlets
Bookmark "Not recieving sessionDestroyed on Browser close" Watch "Not recieving sessionDestroyed on Browser close" New topic
Author

Not recieving sessionDestroyed on Browser close

Kalichar Rangantittu
Ranch Hand

Joined: Jan 15, 2002
Posts: 240
I am trying to perform certain operations when a HttpSession has been destroyed. However, if I close my browser the sessionDestroyed() method of my HttpSessionListener is never invoked. My time out as set in web.xml is only 5000ms. My listener is configured correctly, as I do get the sessionCreated() method call. I am using jboss3.2.3 with tomcat.



Never be satisfied with anything less than the best and you will surely pass the test...
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
Closing the browser has nothing to do with it. The servlet engine should do the timeout when the required number of seconds (not milliseconds) have passed without the session being accessed. You can check to see if the timeout is being set correctly with the HttpSession method getMaxInactiveInterval() - which returns seconds.
The session-timeout parameter in web.xml is in minutes, the setMaxInactiveInterval() method in HttpSession is in seconds.
Bill
[ April 15, 2004: Message edited by: William Brogden ]
Kalichar Rangantittu
Ranch Hand

Joined: Jan 15, 2002
Posts: 240
Yes. I had the time setout set in Millis as 2400 which translated to minutes. Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not recieving sessionDestroyed on Browser close