【问题标题】:The absolute uri: http://www.springsource.org/tags/form cannot be resolved in either web.xml or the jar files deployed with this application绝对 uri: http://www.springsource.org/tags/form 无法在 web.xml 或随此应用程序部署的 jar 文件中解析
【发布时间】:2013-12-29 13:53:51
【问题描述】:

目前,我使用 'Maven' 项目,我在 pom.xml 中放入当前依赖项以使用 Spring Framework where org.springframework.version = 3.1.0.RELEASE :

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

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

<!-- Spring MVC framework -->
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>${org.springframework.version}</version>
</dependency>

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

所有 jar 依赖项都位于 target/myGoogleAppEngine-0.0.1-SNAPSHOT/WEB-INF/lib 中。该目录包含:

spring-aop-3.1.0.RELEASE.jar
spring-beans-3.1.0.RELEASE.jar
spring-webmvc-3.1.0.RELEASE.jar
spring-web-3.1.0.RELEASE.jar
spring-security-taglibs-3.1.0.RELEASE.jar
spring-security-web-3.1.0.RELEASE.jar
...

在我 address.jsp 的开头,我有以下行:

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

但是当我执行 address.jsp 时出现以下错误:

Error 500
org.apache.jasper.JasperException: The absolute uri: http://www.springsource.org/tags/form cannot be resolved in either web.xml or the jar files deployed with this application

【问题讨论】:

标签: java spring jsp maven


【解决方案1】:

在 pom.xml 中添加这个依赖

<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-taglibs</artifactId>
    <version>Your Security Version</version>
</dependency>

【讨论】:

  • 不要认为这是正确的答案,spring 形式在 spring-webmvc 中,根据 OP,它已经是一个依赖项。
  • 他们的类路径中已经有了那个库。此外,他们使用的 taglib 不需要该库。
  • 您的安全版本 我应该在这个中给出什么?它对我不起作用,我尝试了这么长时间,请任何人建议
【解决方案2】:

如果你打开spring-webmvc-3.1.0-RELEASE.jar/META-INF/spring-form.tld&lt;uri&gt;使用的是

<uri>http://www.springframework.org/tags/form</uri>

所以你应该有

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

【讨论】:

猜你喜欢
  • 2014-05-23
  • 1970-01-01
  • 2014-02-15
  • 2017-05-14
  • 2012-01-31
  • 2013-01-31
相关资源
最近更新 更多