Spring security logout link in Facelets
I used to have JSPs implementing spring security logout like this:
<a id="logout" href="&开发者_运维知识库lt;spring:url value="/j_spring_security_logout" htmlEscape="true" />">Logout</a>
Later on when I changed to jsf 2, and started using Facelets, I can't get it to work anymore. I tried many ways. I tried this:
<a id="logout" href="<spring:url value="/j_spring_security_logout" htmlEscape="true" />">Logout</a>
But it wont work. Can someone please help me? I really appreciate your help.
Just
<a href="#{request.contextPath}/j_spring_security_logout">logout</a>
or
<h:outputLink value="/j_spring_security_logout">logout</h:outputLink>
There are two solutions:
<a href="#{request.contextPath}/j_spring_security_logout">Logout1</a>
<h:outputLink value="#{request.contextPath}/j_spring_security_logout">Logout2</h:outputLink>
精彩评论