Starając się sprawdzać, czy użytkownik jest zalogowany używam następujący kod:Błąd przy użyciu Spring upoważnia tag, aby sprawdzić, czy użytkownik jest zalogowany?
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<sec:authorize access="isAuthenticated()">
YES, you are logged in!
</sec:authorize>
Ale ja otrzymuję następujący erorr?
javax.servlet.jsp.JspException: No visible WebSecurityExpressionHandler instance could be found in the application context. There must be at least one in order to support expressions in JSP 'authorize' tags.
at org.springframework.security.taglibs.authz.AuthorizeTag.getExpressionHandler(AuthorizeTag.java:100)
at org.springframework.security.taglibs.authz.AuthorizeTag.authorizeUsingAccessExpression(AuthorizeTag.java:58)
at org.springframework.security.taglibs.authz.AuthorizeTag.doStartTag(AuthorizeTag.java:48)
tak mam to działa właśnie teraz. dziękuję i masz rację. – SJS