JSTL无法使用的问题
报错:The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar
导入JSTL
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
在maven的pom.xml配置
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
问题仍未解决,参考博客
最终查到问题是 jstl.jar 包在ide项目中有,但在tomcat发布的应用WEB-INF/lib下没有,这是工具发布项目的问题,复制一个jar包过去问题就解决了。
jstl.jar没有
<%Java%>代码无法识别等问题
发现没有 pom.xml 引入 servlet 的包
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>