且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

绝对uri:http://java.sun.com/jstl/core无法在web.xml或与此应用程序一起部署的jar文件中解决

更新时间:2022-05-29 03:25:39

您的taglib URI是

Your taglib URI is wrong.

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

此URI来自旧的和EOL的JSTL 1.0库。自JSTL 1.1起,由于EL部分从JSTL移动到JSP,因此taglib的内部工作已更改,因此您需要额外的 / jsp

This URI is from the old and EOL'ed JSTL 1.0 library. Since JSTL 1.1, you need an extra /jsp in the path because the taglib's internal workings were changed because the EL part was moved from JSTL to JSP:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

此外,您试图放入 / WEB-INF中的JAR文件/ lib 是错误的。 javax.servlet.jsp.jstl-api-1.2.1-javadoc.jar 只包含JSTL javadocs和 javaee.jar 包含整个Java EE API,可能是desastreus,因为Tomcat已经部署了它(JSP / Servlet),它可能是冲突

Further, the JAR files which you attempted to drop in /WEB-INF/lib are wrong. The javax.servlet.jsp.jstl-api-1.2.1-javadoc.jar is contains only the JSTL javadocs and the javaee.jar contains the entire Java EE API which may be desastreus because Tomcat ships with parts of it already (JSP/Servlet) which may conflict.

全部删除它们。您需要 jstl-1.2.jar 文件。

Remove them all. You need the jstl-1.2.jar file.

  • Our JSTL tag wiki page