使用IDEA关于<%@ taglib prefix=“c” uri=“http://java.sun.com/jsp/jstl/core” %>报错 解决方法
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
在使用IDEA创建web项目,写.jsp页面时使用到 taglib 这个标签时,需要下载两个jar包或者添加依赖。
- 当使用jar包:需要选中jar包然后右键Add as LIbrary
- 使用依赖时:检查pom.xml是否引入了以下两个依赖
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
- 如果以上两种方法都没有问题就需清理缓存重启IDEA 点击左上角File——Invalidate Caches/Restart…
点击 Invalidate and Resatart