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

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
reply
    Bookmark Topic Watch Topic
  • New Topic