因为<s:if>要比较的值必须放在作用域page,request,session...里,所以先把值放到request里
<%
int apprType = 1;
request.setAttribute("apprType",apprType);
%>
然后再使用<s:if>取出值并判断
<s:if test="#request.apprType==1">
<span>值为1</span>
</s:if>
<s:else>
<span>值为不1</span>
</s:else>