您的位置:首页 > 编程语言 > Java开发

struts2 标签里面不能使用el表达式可以使用ongl表达式

2015-11-25 09:43 573 查看
struts2 标签里面不能使用el表达式只可以使用ongl表达式

使用el表达式的话出错误的

 

According to TLD or attribute directive in tag file, attribute disabled does not accept any expressions



<s:select list="tmpList" name="${eleName}"></s:select>

提示错误信息:According to TLD or attribute directive in tag file, attribute disabled does not accept any expressions

但是可以使用ongl表达式

把$修改为%即可
<s:select list="tmpList" name="%{eleName}"></s:select>

这样就可以了

${}EL表达式可以直接输出内容,但是ONGL不行,它是与STRUTS

的标签相结合使用的
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  struts2.0