import-bot (20211) [Avatar] Offline
[Originally posted by saravanan]


I have a HashMap in session scope. I have added few entries in that HashMap
something like the following :

HashMap map = new HashMap();
map.put("name", "saravanan");
map.put("age", "20");
session.setAttribute("map", map);

In a jsp file, I want to print the value of name attribute (saravanan) by
removing it.

<%= ((Map)session.getAttribute("map")).remove("name") %>

How do I achieve the above expression in JSTL EL ?

import-bot (20211) [Avatar] Offline
Re: Removing an entry in Map using JSTL EL
[Originally posted by bsiggelkow]

I don't think you can do acquire the value and remove in one statement using
EL. You can do this in two statements doing something like:

<%-- prints the value --%>
<c:out value="${}"/>

<%-- remove the value from the map --%>
<c:set target="${}" property="name" value="${null}"/>
573548 (1) [Avatar] Offline
I want to know, Does Google Maps use data?