posted 16 years ago
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
Most of the programming problems can't be solved because you don't know what the exact problem is.
Defining your problem correctly leads you to the right solution.