
- Basic JSP Tutorial
- JSP - Home
- JSP - Overview
- JSP - Environment Setup
- JSP - Architecture
- JSP - Lifecycle
- JSP - Syntax
- JSP - Directives
- JSP - Actions
- JSP - Implicit Objects
- JSP - Client Request
- JSP - Server Response
- JSP - Http Status Codes
- JSP - Form Processing
- JSP - Writing Filters
- JSP - Cookies Handling
- JSP - Session Tracking
- JSP - File Uploading
- JSP - Handling Date
- JSP - Page Redirect
- JSP - Hits Counter
- JSP - Auto Refresh
- JSP - Sending Email
- Advanced JSP Tutorials
- JSP - Standard Tag Library
- JSP - Database Access
- JSP - XML Data
- JSP - Java Beans
- JSP - Custom Tags
- JSP - Expression Language
- JSP - Exception Handling
- JSP - Debugging
- JSP - Security
- JSP - Internationalization
- JSP Useful Resources
- JSP - Questions and Answers
- JSP - Quick Guide
- JSP - Useful Resources
- JSP - Discussion
JSTL - Core <c:remove> Tag
The <c:remove> tag removes a variable from either a specified scope or the first scope where the variable is found (if no scope is specified). This action is not particularly helpful, but it can aid in ensuring that a JSP cleans up any scoped resources it is responsible for.
Attribute
The <c:remove> tag has the following attributes −
Attribute | Description | Required | Default |
---|---|---|---|
var | Name of the variable to remove | Yes | None |
scope | Scope of the variable to remove | No | All scopes |
Example
<%@ taglib uri = "http://java.sun.com/jsp/jstl/core" prefix = "c" %> <html> <head> <title><c:remove> Tag Example</title> </head> <body> <c:set var = "salary" scope = "session" value = "${2000*2}"/> <p>Before Remove Value: <c:out value = "${salary}"/></p> <c:remove var = "salary"/> <p>After Remove Value: <c:out value = "${salary}"/></p> </body> </html>
The above code will generate the following result −
Before Remove Value: 4000 After Remove Value:
jsp_standard_tag_library.htm
Advertisements