How can I implement this without illegally nesting JSP tags?
<s:if test="<s:property value="#count" /> == <s:property value="%{arrayCount}" "/>
The Struts 2 <s:if>
tag is capable enough to fetch values from the value stack or any other context so there is no need to use the property tag inside the if tag.
I assume that both count
and arrayCount
are available in your value stack, or you have set those in your action class/jsp page. All you need to do is:
<s:if test="#count == arrayCount">
// do what ever you want
</s:if>
Itss best to go through some basic OGNL syntax: