About Question enthuware.jwpv6.2.694 :

Moderator: admin

Post Reply
gurpreet_asrgndu
Posts: 55
Joined: Thu Jan 03, 2013 7:51 am
Contact:

About Question enthuware.jwpv6.2.694 :

Post 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?

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.694 :

Post by admin »

Yes.
HttpSession sess = request.getSession();
sess.invalidate();
//sess variable is still accessbile here.
If you like our products and services, please help us by posting your review here.

himaiMinh
Posts: 358
Joined: Fri Nov 29, 2013 8:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.694 :

Post 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.

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.694 :

Post 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.".
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 21 guests