Can not find the tag library descriptor of springframework

Solution 1:

I know it's an old question, but the tag library http://www.springframework.org/tags is provided by spring-webmvc package. With Maven it can be added to the project with the following lines to be added in the pom.xml

<properties>
    <spring.version>3.0.6.RELEASE</spring.version>
</properties>

<dependencies>

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

Without Maven, just add that jar to your classpath. In any case it's not necessary to refer the tld file directly, it will be automatically found.

Solution 2:

  1. Download the Spring dependency jar
  2. Place it to the lib folder path is /WEB-INF/lib/spring.jar
  3. Then open the web.xml and the sample code is:

    <taglib>
      <taglib-uri>/WEB-INF/spring.tld</taglib-uri>
      <taglib-location>/WEB-INF/spring.tld</taglib-location>
    </taglib>
    
  4. Then the taglib is indicated where the jar file locates in ur system.

    <%@ taglib prefix="spring" uri="/WEB-INF/spring.tld" %>
    

Solution 3:

Removing the space between @ and taglib did the trick for me: <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>

Solution 4:

If you are using maven use this dependency:

<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-taglibs</artifactId>
    <version>3.1.4.RELEASE</version>
</dependency>

Solution 5:

The TLD should be located in the spring.jar. Your application won't have any dependency on that URL. It's just used as a unique name to identify the tag library. They could just as well have made the URI "/spring-tags", but using URLs is pretty common place.