Page 1 of 1

About Question enthuware.jwpv6.2.689 :

Posted: Sat Jul 20, 2013 12:26 pm
by basamajoe
Why is this answer wrong?
* String cartid = (String) pageContext.findAttribute("cartid");
It will search for the attribute in page, request, session, and context scopes in that order. If the attribute is in the session scope, it will be returned.

The answer says that it will be returned, if it is in session scope!

Re: About Question enthuware.jwpv6.2.689 :

Posted: Sat Jul 20, 2013 12:32 pm
by admin
I see this option is indeed marked as correct.

Re: About Question enthuware.jwpv6.2.689 :

Posted: Sat Jul 20, 2013 2:01 pm
by basamajoe
My mistake

In case of the answer 2.
Would answer 2 be wrong because to get session we need pageContext.getSession();?

String cartid = (String) session.getAttribute("cartid");

Re: About Question enthuware.jwpv6.2.689 :

Posted: Sat Jul 20, 2013 2:11 pm
by admin
Yes.

HTH,
Paul.