• 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
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

removeAttribute doubt from mock exam

 
Ranch Hand
Posts: 598
3
jQuery Google App Engine Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here the question :

Given that scoped attribute cart exist only in user's session,which two
taken independently ,ensure that scoped attribute cart no longer exits?

A)<c:remove var="cart"/>
B)<c:remove var="${cart}"/>
C)<c:remove scope="session">cart</c:remove>
D)<c:remove scope="session" var="cart"/>
E)<c:remove scope="session">${cart}</c:remove>
According to mock exam's ,the answer is C and D.And it explains that
removeAttribute default is page scope.So B doest not work and incorrect.

I tested the code and found out the real answer should be B and D.
Because c give compilation error ,declaring that body content is empty.

please explain which answers are correct.

best regards,
omi
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Definitely not C. Why did you choose B ? What about A ?
 
Bobby Sharma
Ranch Hand
Posts: 598
3
jQuery Google App Engine Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry chris ,I chosen actually A and mistakenly typed B.

thanks for your reply.
 
Could you hold this kitten for a sec? I need to adjust this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic