Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HttpSessionListener question

 
Mark Uppeteer
Ranch Hand
Posts: 159
C++ Eclipse IDE 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!
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2534
113
Android Chrome Eclipse IDE
  • 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
C++ Eclipse IDE 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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic