Struts2对象栈和值栈的操作
来源:互联网 发布:恒大淘宝股票834338 编辑:程序博客网 时间:2024/06/05 00:35
对象栈的操作
把数据存入对象栈栈顶:
<span style="white-space:pre"></span>ActionContext.getContext().getValueStack().push("aaa");ActionContext.getContext().getValueStack().getRoot().add(0,"bbb");ActionContext.getContext().getValueStack().set("ccc", "ccc");//把一个Map放到对象栈的栈顶把数据从对象栈栈顶取出:
<span style="white-space:pre"></span>ActionContext.getContext().getValueStack().peek();ActionContext.getContext().getValueStack().getRoot().get(0);把数据从对象栈栈顶移除:
<span style="white-space:pre"></span>ActionContext.getContext().getValueStack().pop();ActionContext.getContext().getValueStack().getRoot().remove(0);Map栈的操作
把数据放到Request域:
ServletActionContext.getRequest().setAttribute("aaa", "aaa");
把数据放到session域:
ServletActionContext.getRequest().getSession().setAttribute("aaa", "aaa");把数据放到Application域:
ServletActionContext.getServletContext().setAttribute("aaa", "aaa");把数据直接放到Map栈:
ActionContext.getContext().put("aaa", "aaa");
0 0
- Struts2对象栈和值栈的操作
- Struts2的值栈和对象栈
- Struts2值栈的相关操作
- Struts2操作request、session和application对象
- Struts2操作Request、Session和Application对象
- struts2的值栈存入和获取
- Struts2如何操作Request、Session和Application对象
- Struts2获取servlet的内置对象和struts2的通配符
- Struts2中的ValueStack值栈对象详解
- **struts2中的值栈对象ValueStack**
- Struts2笔记08 获取值栈对象
- 《研磨struts2》第七章 值栈和OGNL 之 7.3 使用OGNL访问复杂对象
- Struts2之实现对action请求对象的拦截操作
- Struts2-值栈和OGNL
- Struts2 值栈和ognl
- Struts2 值栈和OGNL
- struts2的值栈
- Struts2的值栈
- 通过blktrace, debugfs分析磁盘IO
- 关于AsyncTask参数及运行步骤详解and注意事项
- test5.19
- 关于websphere的ibm-web-ext.xmi文件,该如何处理
- Android APP:秒表
- Struts2对象栈和值栈的操作
- JS动态显示时间
- 提高sql语句执行效率及索引
- Mac下破解PhotoShop CS6,支持Retina屏幕
- 常用正则表达式
- C++ 数据抽象、数据封装与接口(抽象类)
- jsp自定义select选择标签和数据字典
- vi 编辑器命令
- xcode7下面出现“Reason: image not found”解决办法