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

来源:互联网 发布:python 对象转字符串 编辑:程序博客网 时间:2024/06/05 17:44

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

的标签相结合使用的

0 0
原创粉丝点击