wood burning stoves*
The moose likes JSP and the fly likes JSTL c:remove does not seem to work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL c:remove does not seem to work" Watch "JSTL c:remove does not seem to work" New topic
Author

JSTL c:remove does not seem to work

Gayatri Ganesh
Ranch Hand

Joined: Dec 23, 2003
Posts: 143
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
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
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.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
Gayatri Ganesh
Ranch Hand

Joined: Dec 23, 2003
Posts: 143
Thanks for replying.

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

Thanks,
Gayatri
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSTL c:remove does not seem to work