• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

JSTL c:remove does not seem to work

 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to remove an attribute in my jsp which was set in my action.

I say in Action :
request.getSession().setAttribute("myattribute", "y");

In my jsp :
<c:remove var="myattribute" />

I tried :
<c:remove var="myattribute" scope="session"/>
<c:remove var="{sessionScope.myattribute}" />

But none seem to work.

Can anyone please advice.

Thanks,
Gayatri
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the tag being invoked or is it merely being piped to the response? Also, <c:remove var="{sessionScope.myattribute}" /> should be <c:remove var="${sessionScope.myattribute}" />

Granted, I've never actually used this action, but those are my first guesses.
 
Gayatri Ganesh
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for replying.

This worked for :
<c:remove var="myattribute" scope="session"/>

Thanks,
Gayatri
 
See where your hand is? Not there. It's next to this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic