i want to use The Spring Security Facelets tag library to secure my UI components
in my JSF 2 pages
i have following dependencies for spring security version 3.0.5:
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${spring-security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring-security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring-security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
<version>${spring-security.version}</version>
</dependency>
i configured applicationSecurity.xml to make spring security login, and it works fine
with UserDetailsService, and when tried to add the security definition:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:pretty="http://ocpsoft.com/prettyfaces"
xmlns:sec="http://www.springframework.org/security/tags">
and when running the application, i got following error:
Warning: This page calls for XML namespace http://www.springframework.org/security/tags declared with prefix sec but no taglibrary exists for that namespace.
Ref: http://static.springsource.org/spring-security/site/petclinic-tutorial.html
please advise.
You will need to add springsecurity.taglib.xml first
as mentioned here:
http://docs.spring.io/autorepo/docs/webflow/2.3.x/reference/html/spring-faces.html#spring-faces-security-taglib
and you should have the org.springframework.faces jar in your classpath in order to use it.
then use the security tags as follows:
Reference