Can not find the tag library descriptor of springframework

后端 未结 14 1933
一向
一向 2020-11-30 07:10

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

相关标签:
14条回答
  • 2020-11-30 07:49

    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>
    
    0 讨论(0)
  • 2020-11-30 07:52

    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.

    0 讨论(0)
  • 2020-11-30 07:52

    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>
    
    0 讨论(0)
  • 2020-11-30 07:55

    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.

    0 讨论(0)
  • 2020-11-30 07:58

    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

    0 讨论(0)
  • 2020-11-30 07:58

    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.

    0 讨论(0)
提交回复
热议问题