struts2架构中action定义属性jsp页面通过EL取不出值

2025-05-11 00:31:18
推荐回答(2个)
回答1:

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

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

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





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

但是可以使用ongl表达式

把$修改为%即可

这样就可以了

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

的标签相结合使用的

回答2:

额,request.setAttribute(name,value);,当然是通过${name}去取啦