Combining Spring Security Tags and Struts2 Tags -
i'm using spring security manage login , sessions on struts2 application. retrieve logged user in jsp page i'm using sec tag lib importing following jsp.
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
so print logged user use <sec:authentication property="principal.username" />
.
i'm iterating through java.util.list
received through action called, iterate through this:
<s:iterator value="#request.mylist" var="useremail"> value: <s:property value="#useremail"/> </s:iterator>
i'm looking way test list item check if same logged user, can't manage retrieve sec
inside <s:if>
tag.
does know how combine both? ,
<s:if test="%{<sec:authentication property="principal.username" /> == #useremail}">
how using information session:
<s:if test="#session.spring_security_context.authentication.principal.username == #useremail">
Comments
Post a Comment