1. 程式人生 > >jsp中的標籤使用

jsp中的標籤使用

jsp中的變數作用域

表示變數作用域,一共4種。pageScope:  表示變數只能在本頁面使用。requestScope:表示變數能在本次請求中使用。sessionScope:表示變數能在本次會話中使用。applicationScope:表示變數能在整個應用程式中使用。

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

c標籤的引入需要導包




<!-- jsp中使用jstl標籤 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>


<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
---------------------