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 ta
I was using Spring-Boot, For me cut-paste of below in Pom.xml worked. May be file wasnt in sync.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
This problem normally appears while copy pasting the tag lib URL from the internet. Usually the quotes ""
in which the URL http://www.springframework.org/tags is embedded might not be correct. Try removing quotes and type them manually. This resolved the issue for me.
Core dependencies for tag library:
> <dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
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.
If you want direct link:
https://github.com/spring-projects/spring-framework/blob/master/spring-webmvc/src/main/resources/META-INF/spring-form.tld
Or from repos:
JCenter : link
Maven Central : link
And if you need as Gradle dependency:
compile 'org.springframework:spring-webmvc:4.1.6.RELEASE
More information about spring-form: http://docs.spring.io/spring/docs/current/spring-framework-reference/html/spring-form.tld.html
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.