繁体   English   中英

绝对的uri:http://www.springsource.org/tags/form无法在web.xml或使用此应用程序部署的jar文件中解析

[英]The absolute uri: http://www.springsource.org/tags/form cannot be resolved in either web.xml or the jar files deployed with this application

目前,我使用'Maven'项目,我在我的pom.xml中放入当前的依赖项来使用Spring Framework,其中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

如果打开spring-webmvc-3.1.0-RELEASE.jar/META-INF/spring-form.tld ,使用的是<uri>

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

所以你应该有

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

在pom.xml中添加此依赖项

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

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM