Java 每个 spring 源 ide 的 springframework.org/tags 表单的 Maven 参考?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19096420/
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-08-12 14:04:36  来源:igfitidea点击:

Maven reference for springframework.org/tags form per spring source ide?

javaeclipsespringsts-springsourcetoolsuite

提问by genxgeek

Hi new to java and I'm getting the following errors per the following lines from a .jsp that I have inherited. Using spring source as my editor.

嗨,java 新手,我从我继承的 .jsp 中得到以下几行错误。使用 spring 源作为我的编辑器。

NOTE: This loads fine per my latest eclipse (kepler) IDE.

注意:根据我最新的 eclipse (kepler) IDE,这可以正常加载。

<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

Errors:

错误:

Can not find the tag library descriptor for "http://www.springframework.org/tags/form" Can not find the tag library descriptor for "http://www.springframework.org/tags"

找不到标签库描述为“ http://www.springframework.org/tags/形式”无法找到“的标签库描述符http://www.springframework.org/标签”

I have the following defined in my pom.xml:

我在 pom.xml 中定义了以下内容:

<spring.version>3.2.1.RELEASE</spring.version>

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>${spring.version}</version>
</dependency>

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-web</artifactId>
    <version>${spring.version}</version>
</dependency>

回答by user3078016

I added:

我补充说:

    <dependency>
    <groupId>taglibs</groupId>
    <artifactId>standard</artifactId>
    <version>1.1.2</version>
   </dependency>

To mypom.xml file this will resolved the issue.

对于 mypom.xml 文件,这将解决该问题。

回答by xYan

Try deleting the spring-mvcdependency, updating the maven project without that dependency and then re-add the spring-mvcdependency. Probably the .jar file is corrupted (as was the case in my project).

尝试删除spring-mvc依赖项,更新没有该依赖项的 maven 项目,然后重新添加spring-mvc依赖项。可能 .jar 文件已损坏(就像我的项目中的情况一样)。

回答by Riddhi Gohil

Add the following dependency

添加以下依赖

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

回答by Alvaro

For me, it worked seamlessly the answer provided by user3078016..

对我来说,它无缝地工作了user3078016提供的答案..

I simply added:

我简单地补充道:

<dependency>
    <groupId>taglibs</groupId>
    <artifactId>standard</artifactId>
    <version>1.1.2</version>
</dependency>

To my pom.xml and voilá, everything is clean now..

对于我的 pom.xml 和 voilá,现在一切都很干净..

BTW, version 1.1.2is actually the last (and current) version of this lib since 2005..

顺便说一句,1.1.2 版实际上是该库自 2005 年以来的最后一个(也是当前)版本。

Thank you..

谢谢..