Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HttpSessionListener doubt  RSS feed

 
Jignesh Patel
Ranch Hand
Posts: 626
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am planing to use HttpSessionListener in my code with Tomcat and Struts framewrok.
I found everything is working fine, but before I implement in real application I want clarify one thing is HttpSessionListener object will be one for all the session or it will be seperate for seperate session.
-Jignesh
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jignesh,
The HttpSessionListener is for all sessions (within that context in that server). The session that the event is regarding is retrieved through the parameter to the event method. (Look at the API docs.)
 
Jignesh Patel
Ranch Hand
Posts: 626
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Nathaniel,
One more doubt if there are two sessions expires together which gets first?
Can you provide me specification link with url?
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, it's impossible for two things to happen at exactly the same time literally in a computer. I can't really imagine a situation where you care whether sessions expire before/after another since they are pretty independent.
You can get the link to API docs of the Java J2EE website.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!