• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

doubt in c:remove

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks very much Collins
reply
    Bookmark Topic Watch Topic
  • New Topic