Source Code : JSTL: Remove the attributes

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

JSTL: Remove the attributes

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

<c:set var="userName" value="Mark" scope="session" />

<html>
  <head>
    <title>Set a scoped attribute</title>
  </head>
  <body>
    This page sets a session-scoped attribute that is removed
    by <a href="removeAttribute.jsp">this</a> page.
  </body>
</html>

//removeAttribute.jsp

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

<html>
  <head>
    <title>Remove a scoped attribute</title>
  </head>
  <body>
    The session-scoped attribute called <b>userName</b> had a value
    of <b> <c:out value="${sessionScope.userName}" /> </b>, but it is about
    to be removed!<p/>

    <c:remove var="userName" scope="session" />

    The value is now "<c:out value="${sessionScope.userName}" />"
  </body>
</html>


           
       

Thank with us