1、在Maven項目的pom.xml的<dependencies></dependencies>標簽中加入以下內(nèi)容:
<!-- https://mvnrepository.com/artifact/javax.servlet/jstl -->
<dependency>
? ? <groupId>javax.servlet</groupId>
? ? <artifactId>jstl</artifactId>
? ? <version>1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/taglibs/standard -->
<dependency>
? ? <groupId>taglibs</groupId>
? ? <artifactId>standard</artifactId>
? ? <version>1.1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.taglibs/taglibs-standard-impl -->
<dependency>
? ? <groupId>org.apache.taglibs</groupId>
? ? <artifactId>taglibs-standard-impl</artifactId>
? ? <version>1.2.5</version>
</dependency>
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
2、在jsp頭部加上jstl的引入標簽:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
1.
3、說明:jstl包為必須,standard和taglibs-standard-impl包二選一。
? ? ? 當然兩個一起寫進去也沒問題,jsp默認選擇用第一個standard jar包
-----------------------------------
?著作權(quán)歸作者所有:來自51CTO博客作者星辰大數(shù)據(jù)的原創(chuàng)作品,請聯(lián)系作者獲取轉(zhuǎn)載授權(quán),否則將追究法律責(zé)任
Maven配置JSTL
https://blog.51cto.com/StarBigData/3671652