• Post Reply Bookmark Topic Watch Topic
  • New Topic

HF Servlets and JSP question  RSS feed

 
Victor Skvorzkoff
Greenhorn
Posts: 13
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good day everyone,

I am studying for Oracle's Web Component Expert exam. On page 221 Chapter 5, Question 11, "only container can invalidate a session" is not a true statement according to this book. But why? Even though a servlet, or any other class that grabs a hold of HttpSession object can call invalidate() BUT isn't it the container that ultimately executes invalidation of session? Isn't HttpSession container's interface that container implements? So this question "which are true?" should also be "only container can invalidate a session".

Any comments? Feedback?

Thanks,
Victor.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37252
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think they mean "only the container can initiate invalidating a session" is a false statement. Because clearly as you point out any piece of code with access to the session can invalidate it!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!