I solved it as follows:
importing:
<jsp:directive.page import="com.opensymphony.xwork2.util.ValueStack"/> <jsp:directive.page import="com.opensymphony.xwork2.ActionContext"/> <jsp:directive.page import="org.apache.struts2.ServletActionContext"/>
then a styling request with:
<jsp:scriptlet><![CDATA[ ValueStack stack = ActionContext.getContext().getValueStack(); stack.set("httpServletRequest", ServletActionContext.getRequest()); ]]></jsp:scriptlet>
and check the roles:
<s:if test="httpServletRequest.isUserInRole('admin')">
Pablo source share