首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

Struts2里Interceptor里操作招致的params interceptor不能工作

2012-10-25 
Struts2里Interceptor里操作导致的params interceptor不能工作写了一个检查Login状态的Interceptor。当sess

Struts2里Interceptor里操作导致的params interceptor不能工作
写了一个检查Login状态的Interceptor。
当session中有值时,在action的valueStack里放了个"login", Boolean.True.
这个值就在valueStack的顶端了。
但是ParameterInterceptor是用OgnlValue对action的property进行设置的。
也要访问ognl的top元素。
Boolean.True不是action。
这样值就丢失 了。

热点排行