• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

HttpSessionListener question

 
Ranch Hand
Posts: 159
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

can anyone tell me why in a servlet's doGet, if there is not yet a session,



doesn't trigger the HttpSessionListener sessionCreated but only the sessionDestroyed ?
if you split it up, it does work as expected...

thanks!
 
Creator of Enthuware JWS+ V6
Posts: 3346
303
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,

req.getSession().setMaxInactiveInterval(0);
doesn't trigger the HttpSessionListener sessionCreated but only the sessionDestroyed ?


It should trigger the sessionCreated.

Are you sure you started a fresh IE, FireFox, Chrome window? Otherwise your session is still alive and it will only destroy it.

Regards,
Frits
 
Mark Uppeteer
Ranch Hand
Posts: 159
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes I think it was that; It works fine now.
Thanks a lot!
 
He does not suffer fools gladly. But this tiny ad does:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic