Page 1 of 1

About Question enthuware.jwpv6.2.694 :

Posted: Fri Jan 18, 2013 6:40 am
by gurpreet_asrgndu
regarding the second option it says that

Even is a session is invalidated (say it times out), the page can still access the session variable.

how is it true?

if session is invalidated then we wont be able to access the session variable . am i missing something?

Re: About Question enthuware.jwpv6.2.694 :

Posted: Fri Jan 18, 2013 1:16 pm
by admin
Yes.
HttpSession sess = request.getSession();
sess.invalidate();
//sess variable is still accessbile here.

Re: About Question enthuware.jwpv6.2.694 :

Posted: Sun May 29, 2016 12:24 pm
by himaiMinh
In the explanation of the last option :
The first request "create" a new session. The user joins the session in subsequent request....
But how about this :

Code: Select all

request.getSession(false);
If there is no session, a session won't be created. So, the first request won't create a new session.

Re: About Question enthuware.jwpv6.2.694 :

Posted: Sun May 29, 2016 12:55 pm
by admin
It is a wrong option. The explanation just gives one reason why it wrong. Your reason is also valid. The explanation further says, "However, it has nothing to do with what this question is asking.".