Suppose that I am using the Struts 2 iterate tag on a list of objects. Each object has a property called creatorUserId.
I would like to compare the creatorUserId with the Id number of the currently logged in user.
How do I do this with Spring Security and Struts 2 in the JSP page?
<security:authentication property="principal.userID" />
displays the current user's ID number
<s:property value="creatorUserId" />
displays the current iterator item's creatorUserId.
I would like to do:
<s:if test="%{creatorUserId == <security:authentication property='principal.userID' />}">
but it is not a legal expression.
Can anyone help with the syntax?