Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not recieving sessionDestroyed on Browser close

 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. I had the time setout set in Millis as 2400 which translated to minutes. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic