A common need for working with Maps in JSP is the ability to remove items from the Map. With JSTL it is not so obvious how to do this, yet it turns out to be very easy by simply using an EL expression to call the remove(key) method on the map. Here is an example…
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<body><p>Creating hash map and populate it ..</p>
<jsp:useBean id="map" class="java.util.HashMap"/>
<c:set target="${map}" property="cat" value="brown"/>
<c:set target="${map}" property="dog" value="green"/>
<c:set target="${map}" property="rat" value="black"/><p>Remove dog and store its former value in a local variable …</p>
<c:set var="oldDogValue" value="${map.remove(’dog’)}"/>
</body>
</html>
Another great tip from Aaron Freeman at SendThisFile.com.
Buy:Female Cialis.Advair.Ventolin.Zocor.Seroquel.Aricept.Wellbutrin SR.SleepWell.Prozac.Female Pink Viagra.Zetia.Benicar.Buspar.Lipothin.Nymphomax.Amoxicillin.Lasix.Lipitor.Cozaar.Acomplia….