Jim So wrote:
But whats wrong with b? Is it because you have access to the session object here?
If so what do you have access to? e.g. request, response, pageContext...
In Classic handler you have access to only pageContext implicit object. That too because you might be remembering that in lifecycle of class tag setPageContext() method runs where pageContext is set in the page. So you can access only pageContext similar to how you used it in jsp page. NO OHTER implicit objects are accessible.
So to get session use pageContext.getSession(). Hope that helps
SCJP 1.4 90%, SCWCD5 94%, Next SCDJWS--> In Naescent stage. Researching abt exam and material itself.
i think the question was lacking of something like "there is no other attribute named cartid in all other scopes." if this is included in the question i would say option C is definitely correct, but you have to choose two correct answers so option C is definitely the best choice compared to options A, B, D.
Im also having problems in questions like this. Can anybody help on this one. If "Select 2 correct options" is not stated then option C is definitely Confusing, isnt it?