开发者

spring-form.tld...where is it?

开发者 https://www.devze.com 2022-12-31 17:17 出处:网络
I cannot find this tag lib, i need it because http://www.springframework.or开发者_开发技巧g/tags/form

I cannot find this tag lib, i need it because http://www.springframework.or开发者_开发技巧g/tags/form does not work.


From Spring 3.0 release, both spring.tld and spring-form.tld can be found in the spring-webmvc-3.0.x.RELEASE.jar file.

To use them the JAR file must be in the classpath. Just add the following lines to the JSP files:

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


In the spring-webmvc-3.0.x.RELEASE.jar, of course.


The spring-webmvc-3.x.x.RELEASE.jar can be included using the following maven:

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

Just make sure that the ${spring.version} that you use matches the version of Spring Security (if you are using it) as this may cause version conflicts.


I had this problem, because the springmvc jar was in an EAR library, I had to place the tld files under the WEB-INF folder, and everything is working now


  1. spring-from.tld path in org.springframework.web.servlet-version.jar meta-inf
  2. org.springframework.web.servlet.version.jar dependent on org.springframework.web-version.jar. just download both jars..paste in lib folder.
  3. in jsp add the below line:

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

0

精彩评论

暂无评论...
验证码 换一张
取 消