方式一

ActionContext context = ActionContext.getContext();
Map<String, Object> session = context.getSession();
session.put("uname","doghua");
ValueStack stack = context.getValueStack();
stack.push(session);



page获取值


方式一,放入值栈中

<s:property value="uname"></s:property>

方式二,放入上下文中

<s:property value="#session.uname"></s:property>


方式二

Action和Page数据共享方式 (值栈/Context) 值栈获取方式

相关文章:

  • 2021-04-04
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2021-05-18
  • 2022-01-17
  • 2022-01-07
猜你喜欢
  • 2021-11-15
  • 2022-12-23
  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
相关资源
相似解决方案