• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt in Listener

 
udhaya kanagaraj
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai all,
I hava a doubt in httpServletListener.I am using Tomcat5.1

Doubt
----
* According to my knowledge session will be maintained in one browser .even if i close that browser and reopen it and execute my session is being maintained.how come this is possible?
* when closing the browser the container will call sessionDestrou(HtttpSessionEvent event) method.Then how it is maintaining session.

Thanks in advance

Regards,
udhaya
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The container will kill the session when either one of these coour
1. session timeout
2. session.invalidate is invoked.

When you closed the browser the server did not know about this so the session remains alive.
 
udhaya kanagaraj
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Pradip Bhat ,
Thanks for ur reply

Regards,
udhaya
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by udhaya kp:
hai all,
I hava a doubt in httpServletListener.I am using Tomcat5.1

Doubt
----
* According to my knowledge session will be maintained in one browser .even if i close that browser and reopen it and execute my session is being maintained.how come this is possible?
* when closing the browser the container will call sessionDestrou(HtttpSessionEvent event) method.Then how it is maintaining session.

Thanks in advance

Regards,
udhaya


Basically session is something that is maintained in the server.only the key to retrieve the session that is the jsessionid is transmitted to the client / browser , which in turn is again sent to the server that is used for getting the server at the server and for the further manupulation.

so when your brouser is closed the server still maintains the session. later when the time-out is exceeded the session expires.

-cheers!
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic