导入的别人做的一个小的demo,关于开涛讲解shiro做的demo,把maven项目导入到eclipse中之后,前端的.jsp文件出现
Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"错误,在网上搜索的说是jstl.jar包存在冲突或者缺失,我把项目maven的依赖jar包部分看了一下,发现没有jstl.jar包存在,因此在pom.xml文件中添加依赖即可。
<!-- Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"错误的第一种解决方法-->
<dependency>
<groupId>javax.servlet.jsp.jstl</groupId>
<artifactId>jstl-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jstl-impl</artifactId>
<version>1.2</version>
</dependency>
添加上之后maven依赖自动有了jstl.jar包,错误解决。
注:之前解决这个问题的时候,知道是jstl.jar包的缺失,当时解决方法是直接下载jstl.jar包,然后外部build path导入这个jar包,没有解决问题。还是直接依赖就行,比较简单方便。