有些时候,<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>会报错,错误提示为:
Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"
主要缘由是缺乏
jstl.jar
standard.jar
java
两个Jar包 web
在pom.xml增长: jsp
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
spa
若是还不行,请调整jstl.jar 版本,这个主要根据web的version的版本有关。增长以下
xml
<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
<taglib-location>/WEB-INF/tlds/fmt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/fmt-rt</taglib-uri>
<taglib-location>/WEB-INF/tlds/fmt-rt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/tlds/c.tld</taglib-location>
</taglib>
</jsp-config>ip