JSTL Core c:remove Tag

JSTL Core c:remove Tag

The JavaServer Pages Standard Tag Library (JSTL) encapsulates core functionality common to many JSP applications. Instead of mixing tags from numerous vendors in your JSP applications, JSTL allows you to employ a single, standard set of tags. This standardization allows you to deploy your applications on any JSP container supporting JSTL and makes it more likely that the implementation of the tags is optimized.

Below is the syntax to include JSTL Core library in your JSP for JSTL Core c:remove Tag :

<%@ taglib prefix=”c” uri=”http://java.sun.com/jsp/jstl/core” %>

JSTL Core c:remove Tag :Removes a scoped variable (from a particular scope, if specified).The syntax and attributes are as follows with example and ran on server to show you output:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>c:remove Example</title>
</head>
<body>
<body>

<c:set var="TotalDayInYear" scope="request" value="${365}"/>
<H2><p>Print before Remove Value: <c:out value="${TotalDayInYear}"/></p>
<c:remove var="TotalDayInYear"/>
<p>Print after Remove Value: <c:out value="${TotalDayInYear}"/></p></H2>

</body>
</html>

 

JSTL Core c:remove Tag output:

cremove

Leave a Reply

Your email address will not be published. Required fields are marked *