1、在Maven项目的pom.xml的<dependencies></dependencies>标签中加入以下内容:
<!-- 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包
-----------------------------------
©著作权归作者所有:来自51CTO博客作者星辰大数据的原创作品,请联系作者获取转载授权,否则将追究法律责任
Maven配置JSTL
https://blog.51cto.com/StarBigData/3671652