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

Struts2中,Action中字段是在什么时候放到request的attributes里的,该怎么解决

2012-10-10 
Struts2中,Action中字段是在什么时候放到request的attributes里的在TestAction里设置一个message字段,并且

Struts2中,Action中字段是在什么时候放到request的attributes里的
在TestAction里设置一个message字段,并且创建getter,setter
我疑惑的是,在jsp页面中用${message}也可以取值,访问的是
TestAction的getter,请问

1.为什么el能取到值,但我监视jsp页面中的request里并没有message相关的attribute?
2.struts2是在什么时候将TestAction里message属性放到request里的(OgnlValueStack类里找半天也没找到-_-!!!)?


[解决办法]
struts2 本身就是对HttpServletRequest 做了一定的封装,所以El表达式可以访问。

你可以看看这篇:http://baiyan425.blog.51cto.com/1573961/777413

热点排行