jstl c:remove

简介: jstl c:remove
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSTL c:remove的使用</title>
</head>
<body bgcolor="#ffffff">
  <c:set value="10000" var="maxUser" scope="application"/>
  <c:set value="20" var="maxIdelTime" scope="session"/>
  <c:set value="hellking" var="accountId" scope="request"/>
  <c:set value="next.jsp" var="nextPage" scope="page"/>
  在没有调用c:remove之前,有这些参数;
  maxUser=<c:out value="${maxUser }"/>
  maxIdelTime=<c:out value="${maxIdelTime }"/>
  accountId=<c:out value="${accountId }"/>
  nextPage=<c:out value="${nextPage }"/>
  <hr/>调用c:remove...
  <c:remove var="maxUser" scope="application"/>
  <c:remove var="maxIdelTime" scope="session"/>
  <c:remove var="accountId" scope="request"/>
  <c:remove var="nextPage" scope="page"/>
  调用了c:remove之后,这些参数值为:
  maxUser=<c:out value="${maxUser}"></c:out>
  maxIdelTime=<c:out value="${maxIdelTime }"></c:out>
  accountId=<c:out value="${accountId }"></c:out>
  nextPage=<c:out value="${nextPage }"/>
</body>
</html>
<c:set>设置变量属性的值;
<c:out>输出属性的值;
<c:remvoe>删除前面设置的属性;
目录
相关文章
|
8月前
|
Java
JDK version和class file version对应关系
JDK version和class file version对应关系
|
9月前
|
Java
JSTL jar包版本错误attribute items does not accept any expressions
确保你在 `items` 属性中使用了一个实际的集合或数组变量,而不是表达式,以解决这个问题。
69 0
|
9月前
|
Java API Maven
maven中scope和optional区别
maven中scope和optional区别
125 1
|
9月前
|
Java Spring
spring-doc报错Unable to render this definition
spring-doc报错Unable to render this definition
513 0
|
9月前
|
SQL JSON Java
Java【问题记录 02】对象封装+固定排序+list All elements are null引起的异常处理+Missing artifact com.sun:tools:jar:1.8.0
Java【问题记录 02】对象封装+固定排序+list All elements are null引起的异常处理+Missing artifact com.sun:tools:jar:1.8.0
101 0
|
Java 关系型数据库 MySQL
Dependency ‘org.springframeworkspring-context5.0.2.RELEASE‘ not found
Dependency ‘org.springframeworkspring-context5.0.2.RELEASE‘ not found
208 0
|
Java Android开发
springMvc37-Unknow tag(c:forEach)错误解决办法,jstl.jar包以及standard.jar包下载与导入
springMvc37-Unknow tag(c:forEach)错误解决办法,jstl.jar包以及standard.jar包下载与导入
143 0
springMvc37-Unknow tag(c:forEach)错误解决办法,jstl.jar包以及standard.jar包下载与导入
|
XML Java 数据格式
Spring的applicationContext.xml的配置和lookup-method,replaced-method的使用(三)
Spring的applicationContext.xml的配置和lookup-method,replaced-method的使用(三)
230 0
Spring的applicationContext.xml的配置和lookup-method,replaced-method的使用(三)
|
Java jenkins 测试技术
Maven问题-Unable to find main class
Maven问题-Unable to find main class
922 0
|
Java
[Struts]"Cannot find bean in any scope"之一解
问题描述 今天在开发中遇到一奇怪问题,有一个action,在该action里使用request.setAttribute()方法将一个List类型对象放在request中,然后forward到一个jsp文件,该文件的主要内容是使用<logic:iterate>标签将这个List对象中的条目列表显示。
2360 0