jstl core remove tag

JSTL core remove tag

jstl core remove tag is use to remove value from specified variable and It will delete the variable from the specified scope.


<c:remove var = "variable_name" />

jstl core remove tag example

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>JSTL Examples</title>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 <c:set var="name" scope="request" value="Vikash Kumar" />
 <c:out value="${name}" />
 <c:remove var = "name" />
 <c:out value="${name}" />


Vikash Kumar

Please observe output Vikash Kumar printed only once because i have deleted name variable using remove tag.



Full-stack web and mobile app development company Contact Us : Skype: indore.webcoder Email: info@w3sparks.com Sales: +91 8085506229