<select name="gender">
<option value="男" <s:if test='profile.gender=="男"'>selected="selected"</s:if>>男</option>
<option value="女" <s:if test='profile.gender=="女"'>selected="selected"</s:if>>女</option>
</select>
Profile为action中的一个属性属于值栈中的内容,所以不需要#来取出内容
关键在test条件的外面是单引号,里面的测试字符串应该为双引号。
也可以参考<s:if test='{#staffinfo.grade == "高"}'></s:if>