Spring Security, JSP Tag Lib Error -
I want to include the Spring Security tag in my JSP file (this means in the JSP taglib scriptlet), so I have the following The line has been added to my JSP taglib prefix = "security" ury = "http://www.springframework.org/security/tags" (script in JSP tag)
but I get the following error home.jsp : Getting 2: 5: No tag library found with this URI. Potential reasons may be that the URI is incorrect, or there are errors during parsing the .tld file.
& lt; Dependency & gt; & Lt; Group & gt; Org.springframework.security & lt; / Group & gt; & Lt; ArtifactId & gt; Spring-security-web & lt; / ArtifactId> & Lt; Version & gt; 3.0.5.RELEASE & lt; / Edition & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.springframework.security & lt; / Group & gt; & Lt; ArtifactId & gt; Spring-safety-core & lt; / ArtifactId> & Lt; Version & gt; 3.0.5.RELEASE & lt; / Edition & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.springframework.security & lt; / Group & gt; & Lt; ArtifactId & gt; Spring-protection-config & lt; / ArtifactId> & Lt; Version & gt; 3.0.5.RELEASE & lt; / Edition & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.springframework.security & lt; / Group & gt; & Lt; ArtifactId & gt; Spring-safety-taglibs & lt; / ArtifactId> & Lt; Version & gt; 3.0.5.RELEASE & lt; / Edition & gt; & Lt; / Dependencies & gt;
& lt;% @ taglib prefix = "sec" uri = " Http: //www.springframework.org/security/tags "%>
Works with me for
& lt; Dependency & gt; & Lt; Group & gt; Org.springframework.security & lt; / Group & gt; & Lt; ArtifactId & gt; Spring-protection-config & lt; / ArtifactId> & Lt; Version & gt; $ {Spring.security.version} & lt; / Edition & gt; & Lt; Scope & gt; $ {DefaultScope} & lt; / Scope & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.springframework.security & lt; / Group & gt; & Lt; ArtifactId & gt; Spring-safety-core & lt; / ArtifactId> & Lt; Version & gt; $ {Spring.security.version} & lt; / Edition & gt; & Lt; Scope & gt; $ {DefaultScope} & lt; / Scope & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.springframework.security & lt; / Group & gt; & Lt; ArtifactId & gt; Spring-security-web & lt; / ArtifactId> & Lt; Version & gt; $ {Spring.security.version} & lt; / Edition & gt; & Lt; Scope & gt; $ {DefaultScope} & lt; / Scope & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.springframework.security & lt; / Group & gt; & Lt; ArtifactId & gt; Spring-safety-taglibs & lt; / ArtifactId> & Lt; Version & gt; $ {Spring.security.version} & lt; / Edition & gt; & Lt; Scope & gt; $ {DefaultScope} & lt; / Scope & gt; & Lt; / Dependencies & gt;
Where spring .security.version = 3.1.4.RELEASE.
And make sure you include the correct jst jar.
Comments
Post a Comment