Hi,
Is there a JSTL way of removing objects in session, something like <%= session.removeAttribute("key") %>? I tried doing something like <c:remove var="${sessionScope['key']}"/> but that did not work. Any ideas would be appreciated.
-los
Discussions
Web tier: servlets, JSP, Web frameworks: JSTL way for doing session.removeAttribute( "key" )
-
JSTL way for doing session.removeAttribute( "key" ) (2 messages)
- Posted by: Los Morales
- Posted on: January 20 2004 15:37 EST
Threaded Messages (2)
- JSTL way for doing session.removeAttribute( "key" ) by Ray Baco on January 20 2004 18:19 EST
- JSTL way for doing session.removeAttribute( "key" ) by Los Morales on January 21 2004 13:37 EST
-
JSTL way for doing session.removeAttribute( "key" )[ Go to top ]
- Posted by: Ray Baco
- Posted on: January 20 2004 18:19 EST
- in response to Los Morales
For an object keyed into the session as "cart" you would remove it by using
<c:remove var="cart" scope="session"/>
Hope this helps. -
JSTL way for doing session.removeAttribute( "key" )[ Go to top ]
- Posted by: Los Morales
- Posted on: January 21 2004 13:37 EST
- in response to Ray Baco
The <c:remove> tag does not work. seems like this tag only works if you have previously used the <c:set var="..." />, i.e. the variable var has to be scoped to the page (or so it seems like).
-los