• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Usage of c:remove tag

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Time is the best teacher, but unfortunately, it kills all of its students - Robin Williams. tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic