昨儿做梦梦到别人问怎么在java文件里操作上下文,一下子醒了。。。

Java文件里,操作上下文有两种方式;

咋赋值呢

ActionContext.getContext().put("a", 1);  

ActionContext.getContext().getValueStack().setValue("#b", 2);

取值呢?

ActionContext.getContext().get("a", 1);  

ActionContext.getContext().getValueStack().findValue("#b");          

ActionContext.getContext().getValueStack().findValue("#a");

要总结才行。。好记性不如乱笔头啊。。

相关文章:

  • 2021-12-03
  • 2021-08-22
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
猜你喜欢
  • 2021-12-19
  • 2021-11-16
  • 2021-08-20
  • 2021-11-09
  • 2022-01-20
  • 2021-09-07
相关资源
相似解决方案