A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
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
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 agree. 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