aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Question about JSTL (c:remove) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Question about JSTL (c:remove)" Watch "Question about JSTL (c:remove)" New topic
Author

Question about JSTL (c:remove)

Botez Nicolae
Greenhorn

Joined: Jun 28, 2011
Posts: 4
I am preapring for web component certification and I have a question from a mock exam which confused me. This is the question with the answer:

Given that a scoped attribute cart exists only in a user's session, which two, taken independently, ensure the scoped attribute cart no longer exists? (Choose two.)
A. ${cart=null}
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: D,E
Incorrect Answers:
Not C: no session scope attribute
Not G: ${cart} will return the VALUE of cart, not the cart variable


In my opinion the correct answers are B and D not D,E as it is written in the mock exam. Am I right ? Please help me!
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1696
    
  25

Hi Nicolae,

Welcome to the ranch!

In my opinion the correct answers are B and D not D,E as it is written in the mock exam. Am I right ?

Yes, you are right: the mock exam is wrong.

Regards,
Frits
Botez Nicolae
Greenhorn

Joined: Jun 28, 2011
Posts: 4
Thanks a lot!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question about JSTL (c:remove)