Cannot resolve taglib with uri http://java.sun.com/jsp/jstl/core
In my JSP page I have the following taglib:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
IDEA shows it as read and says:
"Cannot resolve taglib with uri http://java.sun.com/jsp/jstl/core"
I have even downloaded the JSTL-1.1.2.jar and added to my classpath, yet it still doesn't know what to do with it. There are no .tld files in the .jar.
Do I have to download the .tld for the standard JSTL tag libraries and configure the URI and Path for each one? Where do I get the .tld's from?
请先登录再写评论。
Most likely you'll need to include an actual implementation of jstl: for
instance the one from jakarta taglibs.
In you look in "standard-1.1.1.jar" or similar, you'll find the TLDs in the
META-INF directory of the jar.
After adding jstl-1.1.2.jar and standard-1.1.2.jar to your module, you might need to close and reopen the editor for the changes to have effect.
I just got bitten by this: a java library module (not a web module) included a number of .tagx tag files in META-INF/tags, but did not have jstl-1.1.2.jar and standard-1.1.2.jar defined as libraries (as they are not necessary for compilation). The editor kept complaining about http://java.sun.com/jsp/jstl/core until I realized what was going on.
I think the url has changed too - I had to drop the jsp bit of it
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>