简体   繁体   English

绝对URI:无法解析http://java.sun.com/jsp/jstl/core

[英]The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved

I searched several other threads on this error, most of them either had the wrong/missing maven dependency or had the wrong uri in their taglib. 我搜索了其他几个关于此错误的线程,其中大多数要么具有错误/缺少的Maven依赖关系,要么其taglib中的uri错误。

As far as I know, I've got everything correct and my app keeps failing once I get to the jsp where I use JSTL. 据我所知,我一切都正确,一旦到达使用JSTL的jsp,我的应用程序就会不断失败。

This is the taglib I'm using: 这是我正在使用的taglib:

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

And these are my maven dependencies 这些是我的Maven依赖项

<dependencies>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
        <version>1.2</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

As far as I know, from the servlet api 2.4 on you need jstl 1.2, which I have, so I really don't see the problem here... 据我所知,从servlet api 2.4开始,您需要我拥有的jstl 1.2,所以我真的在这里看不到问题...

EDIT: I see this question has been marked as a duplicate, though it isn't. 编辑:我看到这个问题已被标记为重复,尽管不是。 The referring question was solved by fixing the uri of the taglib , here it was a case of adding jstl to tomcat's lib folder 通过修复taglib的uri解决了引用的问题,这是在Tomcat的lib文件夹中添加jstl的一种情况

I added jstl-1.2.jar to my tomcat/lib folder. 我将jstl-1.2.jar添加到了tomcat/lib文件夹中。 As tomcat doesn't have the jstl jar and by putting my scope on provided I had to make sure my container (tomcat) had the relevant jar available. 由于tomcat没有jstl jar,因此通过provided我的作用域,我必须确保我的容器(tomcat)具有相关的jar。

Though I haven't tested it, this should also work by leaving the jstl jar on the default compile scope 尽管我还没有测试过,但这也应该通过将jstl jar保留在默认编译范围内而起作用

Try this one from mvnrepository mvnrepository试试这个

<dependency>
    <groupId>jstl</groupId>
    <artifactId>jstl</artifactId>
    <version>1.2</version>
</dependency>

Read similar post here 在这里阅读类似的帖子


Update the version 更新版本

 <dependency>
     <groupId>javax.servlet</groupId>
     <artifactId>javax.servlet-api</artifactId>
     <version>3.1.0</version>
 </dependency>

Use : 采用 :

<dependency>
    <groupId>javax.servlet.jsp.jstl</groupId>
    <artifactId>jstl-api</artifactId>
    <version>1.2</version>
</dependency>

javax.servlet moved to above. javax.servlet移至上方。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Jetty 9.0 绝对uri:http://java.sun.com/jsp/jstl/core 无法解析 - Jetty 9.0 The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved 绝对URI:[http://java.sun.com/jsp/jstl/core]无法解决错误 - The absolute uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved error Apache Tomcat 10.0.0-M1 使用 JSP Absolute uri http://java.sun.com/jsp/jstl/core 无法解析 - Apache Tomcat 10.0.0-M1 using JSP Absolute uri http://java.sun.com/jsp/jstl/core cannot be resolved 绝对的uri:http://java.sun.com/jsp/jstl/core无法在web.xml或使用此应用程序部署的jar文件中解析 - The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this app 在Eclipse WTP中从Tomcat 7迁移到8:绝对uri:http://java.sun.com/jstl/core无法解析 - Migrating from Tomcat 7 to 8 in Eclipse WTP: The absolute uri: http://java.sun.com/jstl/core cannot be resolved “绝对 uri:http://java.sun.com/jstl/core 无法解析” - “The absolute uri: http://java.sun.com/jstl/core cannot be resolved” JSTL错误:绝对uri:http://java.sun.com/jsp/jstl/core不能在web.xml或与此应用程序一起部署的jar文件中解析 - JSTL error: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application JSTL:绝对uri:无法在web.xml或与此应用程序一起部署的jar文件中解析http://java.sun.com/jsp/jstl/core - JSTL: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application 错误HTTP状态500-绝对URI:无法在web.xml或jar文件中解析http://java.sun.com/jsp/jstl/core - Error HTTP Status 500 - The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files 绝对uri:http://java.sun.com/jsp/jstl/core不能在web.xml或tomcat中与此应用程序错误一起部署的jar文件中解决 - Absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application error in tomcat
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM