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?
About Question enthuware.jwpv6.2.694 :
Moderator: admin
-
- Posts: 55
- Joined: Thu Jan 03, 2013 7:51 am
- Contact:
-
- Site Admin
- Posts: 10078
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.694 :
Yes.
HttpSession sess = request.getSession();
sess.invalidate();
//sess variable is still accessbile here.
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.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.694 :
In the explanation of the last option :
If there is no session, a session won't be created. So, the first request won't create a new session.
But how about this :The first request "create" a new session. The user joins the session in subsequent request....
Code: Select all
request.getSession(false);
-
- Site Admin
- Posts: 10078
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.694 :
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.
Who is online
Users browsing this forum: No registered users and 6 guests