首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

struts2中if标签中字符串比较的准确写法

2013-01-21 
struts2中if标签中字符串比较的正确写法错误写法:s:if testaStringProperty AWhy doesnt this

struts2中if标签中字符串比较的正确写法
错误写法:

<s:if test="aStringProperty == 'A'">  Why doesn't this work when myString is equal to A?</s:if>


正确写法:
<s:if test='aStringProperty == "A"'>  This works!</s:if><s:if test="aStringProperty == "A"">  This works too!</s:if>

热点排行