<%@ 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>删除前面设置的属性;
posted on 2014-08-27 11:20  波波嘟  阅读(268)  评论(0)    收藏  举报