tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siggelkow, Bill" <bill.siggel...@mirant.com>
Subject RE: Removing a value from a map present in Session
Date Mon, 11 Aug 2003 16:26:53 GMT
There is a subtle difference here -- using the <c:set ...> method I think it will actually
set the Map value to null but the key will still be there.  Whereas doing the explicity Map.remove()
will actually remove the map entry.

-----Original Message-----
From: Kris Schneider [mailto:kris@dotech.com]
Sent: Monday, August 11, 2003 12:21 PM
To: Tag Libraries Users List; shanmugampl@india.adventnet.com
Subject: Re: Removing a value from a map present in Session


With JSTL:

<c:set target="${sessionScope.map}" property="name" value="${null}"/>

Quoting shanmugampl <shanmugampl@india.adventnet.com>:

> Hi,
> 
>     I have a map in session scope which contains an entry with key 
> "name". I want to remove that entry from the map
> 
> <%= ((Map)session.getAttribute("map")).remove("name") %>
> 
> How do i achieve this in jstl el ?
> 
> Thanks
> Shanmugam PL

-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org

Mime
View raw message