Action访问ServletAPI
来源:互联网 发布:天津软件工作者薪资 编辑:程序博客网 时间:2024/04/30 21:04
Action访问ServletAPI
- 取得Map类型的request、session、application
- 属性
java request = (Map)ActionContext.getContext().get("request");
java session = (Map)Action.Context.getContext().getSession();
java application = (Map)ActionContext.getContext().getApplication();
- IoC(Inversion Of Control, 控制反转):RequestAware、SessionAware、ApplicationAware
- 属性
取得真实类型的HttpServletRequest、HttpSession、ServletContext
- ServletActionContext.getContext()
private HttpServletRequest;private HttpSession;private ServletContext application;public AccessServletAPIAction3(){ this.request = ServletActionContext.getRequest(); this.session = this.request.getSession(); this.application = ServletActionContext.getServletContext();}
- ServletRequestAware、SerlvetResponseAware、ServletContextAware;似乎也是控制反转
0 0
- Action访问servletAPI方式
- Action访问ServletAPI
- Action访问ServletAPI
- Action访问ServletAPI
- Action直接访问ServletAPI
- Struts2中Action访问ServletAPI
- Struts2中Action访问ServletAPI
- Action 中访问servletAPI的方式总结
- Struts2的Action访问ServletAPI的方式
- struts2学习(11)——action访问ServletAPI
- Structs中Action访问ServletAPI的几种方式
- Action获取servletapi
- action获取原生servletAPI
- Struts2 访问servletAPI
- Struts2获取/访问ServletAPI
- websocket访问ServletAPI
- Struts2中访问ServletAPI
- Struts2之访问ServletAPI
- MyEclipse使用总结——MyEclipse10安装SVN插件
- End-to-end LSTM-based dialog control optimized with supervised and reinforcement learning
- 操作系统精髓与设计原理(原书第6版)——学习笔记(10)
- ViewPager或Fragment中使用Fragment(二)
- JSR 规范列表
- Action访问ServletAPI
- JAVA中的反射机制
- 断言NSAssert()-调试程序中的Bug
- poj 2480 Longge's problem
- Java 中的 String 为什么是不可变的
- Spring 3.2.* MVC通过Ajax获取JSON数据报406错误
- 牛客网 剑指offer系列 错题记录二
- mysql分表和表分区详解
- 11个最值得Java开发者收藏的网站