This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes doubt in c:remove Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "doubt in c:remove" Watch "doubt in c:remove" New topic
Author

doubt in c:remove

James Mark
Ranch Hand

Joined: Jul 05, 2007
Posts: 115
<c:set var='cart' value='Apple' scope='session'/>
<c:remove var='cart'/>
${sessionScope.cart}

The third line doesnt printAnything
I think if scope is not specified the default scope is page for the <c:remove/> tag

But the above code seems like it search in another scopes to remove the
scoped variable
Please clarify my point.Thanks in Advance


SCJP1.4(96%) SCWCD1.4(92%)
Collins Mbianda
Ranch Hand

Joined: Aug 11, 2007
Posts: 259
Hi James !!!

If you are using HFSJ, take a look to page 448 for <c:remove>.
There is a mistake on that page:

<c:remove var="userStatus" scope="request" />

Instead of what is writen about the scope, read:
The scope is optionnal and when is not specified, the attribute is removed from all scopes.

Check the HFSJ Errata

Hope it help.
[ December 31, 2007: Message edited by: Collins Mbianda ]

SCJP 5.0 | SCWCD 1.4
James Mark
Ranch Hand

Joined: Jul 05, 2007
Posts: 115
Thanks very much Collins
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: doubt in c:remove
 
Similar Threads
Mock exam question
doubt in JSTL
About c:remove
Usage of c:remove tag
removeAttribute doubt from mock exam