Spring boot taglibs Spring boot taglibs spring spring

Spring boot taglibs


I added following dependency:

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

Now it works.


Add the following dependency

For : <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> :  <dependency>    <groupId>org.springframework.boot</groupId>    <artifactId>spring-boot-starter-web</artifactId></dependency>For : <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%> :<dependency>    <groupId>org.springframework.security</groupId>    <artifactId>spring-security-taglibs</artifactId></dependency>


Gradle users with Tomcat Plugin

If you are getting this error even if you have your dependency declared in gradle.build

runtime "org.springframework.security:spring-security-taglibs:${springSecurityVersion}"

And you are using the Tomcat plugin:

apply plugin: 'com.bmuschko.tomcat'

Then you MUST run the gradle tasktomcatRunWar instead of tomcatRun, so that the library is included in your servlet container.