A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Refactoring for Software Design Smells: Managing Technical Debt
this week in the
OO, Patterns, UML and Refactoring
Web Component Certification (SCWCD/OCPJWCD)
HFSJ Mock Exam
Joined: Feb 24, 2008
Dec 26, 2008 04:52:00
I was going through HFSJ 1st edition Q15.
Q:- Once a session has been invalidated, which HttpSession methods can be called on that session without throwing illegalState Exception?
Answer: - Since the servletContext survives, getServletContext can be called successfully on an invalid session.
I am not so clear why? if an object is invalid now...how and why getServletContext servives. Trying to access this should give null pinter exception or
Please clarufy this doubt
Joined: Aug 17, 2008
Dec 26, 2008 08:00:00
When you call invalidate()
The session ID no longer exists.
The attributes are removed from the session object.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: HFSJ Mock Exam
HFSJ Mock question on Session timeout
Hints for SCWCD
Why an invalid session can invoke its method
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015