Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 198 Vote(s) - 3.57 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can not find the tag library descriptor of springframework

#1
I'm trying to follow the example of spring JPetStore but I get an error in the JSP pages in the line that references the lib tag spring:

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

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


What is the URL of this library?

Is there any way to avoid the direct dependence on this URL?

Thanks in advance
Reply

#2
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.
Reply

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

#4
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.
Reply

#5
you have to add the dependency for springs mvc

tray adding that in your pom

<!-- mvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
Reply

#6
I finally configured RAD to build my Maven-based project, but was getting the following exception when I navigate to a page that uses the Spring taglib:

> JSPG0047E: Unable to locate tag library for uri
>

[To see links please register here]

at
> com.ibm.ws.jsp.translator.visitor.tagfiledep.TagFileDependencyVisitor.visitCustomTagStart(TagFileDependencyVisitor.java:76)
> ...

The way I had configured my EAR, all the jars were in the EAR, not in the WAR’s WEB-INF/lib. According to the JSP 2.0 spec, I believe tag libs are searched for in all subdirectories of WEB-INF, hence the issue. My solution was to copy the tld files and place under WEB-INF/lib or WEB-INF.. Then it worked.
Reply

#7
Here is another case.

We have several portlets in different portlet application war and all of them use spring. So in order to reduce size of each war, we have created shared libraries for spring jars in the WebSphere Portal server.

However, I came across the same issue as above of not having the spring form tags being referred from the jsp files.

In order to resolve, I have copied the spring-form.tld file into the WEB-INF/ directory and redeployed the war and it worked.

Hope it helps for anyone having a similar issue as mine.
Reply

#8
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" %>

Reply

#9
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>
Reply

#10
I had the same issue with weblogic 12c and maven I initially while deploying from eclipse (kepler) (deploying from the console gave no errors).

The other solutions given on this page didn't help.

I extracted the *spring.tld spring-form.tld* files of the spring-webmvc jar (which I found in my repository) in the web\WEB-INF folder of my war module;

I did a fresh build; deployed (from eclipse) into weblogic 12c, tested the application and the error was gone;

I removed the *spring.tld spring-form.tld* files again and after deleting; rebuilding and redeploying the application the error didn't show up again.

I double checked whether the files were gone in the war and they were indeed not present.

hope this helps others with a similar issue...
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through