File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About Session?

 
Sirish Reddy
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jguru's..
As soon as i obtaining my session object (eighter in servlet or jsp) can i explicitly Kills the session object if tell me the procedure lies inside?
Regards..
Sirish G Reddy.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the documentation for the HttpSession interface in the javax.servlet.http package.
See the method invalidate();
After a session has been invalidated, it is effectively killed since it can't be used in any way and will eventually be garbage collected.
If you don't have a copy of the Javadocs for the servlet and jsp classes you should get one asap.
Bill
 
Guido Schoepp
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by William Brogden:
After a session has been invalidated, it is effectively killed since it can't be used in any way ...


With one exception: you may call session.getServletContext() on an invalidated session object. You have to know this for the SCWCD exam... ;-)

Guido
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic