• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt in c:remove

 
James Mark
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<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
 
Collins Mbianda
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
James Mark
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much Collins
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic