在 Eclipse 中找不到 JSTL 核心库描述符错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14545285/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 19:52:51  来源:igfitidea点击:

Cannot find the JSTL core library descriptor error in Eclipse

eclipsejspjakarta-eejstltaglib

提问by Mahesha999

I am getting following error:

我收到以下错误:

enter image description here

enter image description here

The taglib declaration I have:

我有标签库声明:

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

Also I have included jstl.jar in my project libraries folder as can be seen above. So what could be other possible reasons.

此外,我在我的项目库文件夹中包含了 jstl.jar,如上所示。那么还有什么其他可能的原因。

回答by Med

  1. Drop all the directives you currently have in your JSP file, and drop the jstl.jarand standard.jar.
  2. Download the last JAR of JSTL here, and put it in your /WEB-INF/libfolder.
  3. Use the following URI in your taglibdirectives.
  1. 删除您当前在 JSP 文件中的所有指令,并删除jstl.jarstandard.jar.
  2. 此处下载 JSTL 的最后一个 JAR ,并将其放入您的/WEB-INF/lib文件夹中。
  3. taglib指令中使用以下 URI 。

Directive for JSTL Core:

JSTL 核心指令:

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

回答by SkynetAdmin

I had the same problem, the solution was removing the "/jsp" from uri:

我遇到了同样的问题,解决方案是从 uri 中删除“/jsp”:

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

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

In my case, I also had to change the "jstl/core" to "jstl/core_rt"

就我而言,我还必须将“jstl/core”更改为“jstl/core_rt”

Regards.

问候。