Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Question about JSTL (c:remove)

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Creator of Enthuware JWS+ V6
Posts: 3343
303
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot!
 
I've got no option but to sell you all for scientific experiments. Or a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic