调试值栈ValueStack
<constant name="struts.devMode" value="true"/>
<s:debug></s:debug>
el表达式取值栈中的数据:${user.username }${user.userage }
利用ognl表达式取值栈中的值:<s:property value="user.username"/>
<s:property value="#attr.str.length"/><br>
attr是struts2添加到值栈的上下文取的一个Map(org.apache.struts2.util.AttributeMap)
查找顺序 page—>request—–>session—->application;
ActionContext.getContext().getValueStack().set("user", user);
System.out.println(ActionContext.getContext().getValueStack().findValue("user"));
ValueStack stack = ActionContext.getContext().getValueStack();