I just upgraded from Spring Security 3.0.5 to 3.1.0.RC3
Now, the following JSP code gives me java.lang.ClassNotFoundException: org.springframework.security.taglibs.authz.AuthorizeTag
<security:authorize access="not hasRole('ROLE_ANONYMOUS')">
Welcome <%= request.getUserPrincipal().getName() %>
</security:authorize>
I look at the Spring Security Reference Documentation 3.1 and it looks like the <security:authorize>
tag should work. However when I look at the directory org.springframework.security.taglibs.authz
in spring-security-taglibs-3.1.0.RC3.jar
I cannot see any AuthorizeTag.class
there.
What is wrong here?
Thanks!
I found that Tomcat might cache the old security.tld, even the spring security library are all 3.1 version. Delete the Tomcat work directory and restart it would works fine now.