Two Laptop Bag*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Usage of c:remove tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Usage of c:remove tag" Watch "Usage of c:remove tag" New topic
Author

Usage of c:remove tag

Ranjani Theyagarajan
Greenhorn

Joined: Feb 08, 2006
Posts: 19
Given that a scoped attribute cart exist only in a user's session,
which two taken independently, ensure the scoped attribute cart no longer exists(choose two)

a) ${cart=nll}
b) <c:remove var="cart" />
c) <c:remove var="${cart}" />
d) <c:remove var="cart" scope="session" />
e) <c:remove scope="session">cart</c:remove>
f) <c:remove var="${cart}" scope="session" />
g) <c:remove scope="session">${cart}</c:remove>

Answer B,D

But i think the appropriate answers is only D. Can anyone help
me solve this one?
Patrick Williams
Ranch Hand

Joined: Apr 03, 2005
Posts: 213
B is correct provided that there is no cart attribute in page and request scopes. Given the literal interpretation of exam questions, I would have to agree that D is the only correct choice given the specific language of the question. When I have doubts about a question like this, I choose the correct answers first and then try to find the "best answer" to fill in the requirement of choosing 2. I came up with B and D without peeking at the answer first by using this technique. I hope that this helps.


Patrick<br /> <br />SCJP/SCWCD/SCBCD/SCDJWS/SCEA<br /> <br />Currently working on:<br />SCJP 6
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Usage of c:remove tag
 
Similar Threads
About c:remove
Question about JSTL (c:remove)
JSTL - c:remove doubt
Mock exam question
removeAttribute doubt from mock exam