Interceptor,invocation.invoke();之前设值是有效的,之后却失效了,代码如下:
[code="java"]
@Override
public String intercept(ActionInvocation invocation) throws Exception {
ActionContext context = ActionContext.getContext();
ValueStack vs = context.getValueStack();
vs.set("dddd", "ddddddddddd");
String result = invocation.invoke();
System.out.println("$$$$$$$$$$"+vs.findString("dddd"));
vs.set("dddd", "ffffffffffff");
System.out.println("$$$$$$$$$$"+vs.findString("dddd"));
}
[/code]
console输出结果是对的:
$$$$$$$$$$ddddddddddd
$$$$$$$$$$ffffffffffff
jsp显示是错的:
--> ddddddddddd
谁见过这个问题?
(Interceptor是定义在最下面的,最接近action了)