2007-10-26
struts2 Action中获取request, response对象的方法
struts2 Action中获取request, response对象的方法
- ActionContext ctx = ActionContext.getContext();
- HttpServletRequest request = (HttpServletRequest)ctx.get(ServletActionContext.HTTP_REQUEST);
- HttpServletResponse response = (HttpServletResponse)ctx.get(ServletActionContext.HTTP_RESPONSE);
- //ServletActionContext.APPLICATION;
- //ServletActionContext.SESSION;
- //ServletActionContext.PAGE_CONTEXT;
发表评论
- 浏览: 25894 次
- 性别:

- 来自: 深圳

- 详细资料
搜索本博客
我的相册
struts2-ajax-code
共 2 张
共 2 张
链接
最新评论
-
JSON的序列化和反序列化
看上去不错
-- by sunyujia -
Struts2.0与DWR2.0 的整 ...
正在测试楼主的附件...
-- by custer7572 -
校验码图片生成
老兄,知识要灵活运用...不是什么代码Copy过去就没事了!
-- by lxy19791111 -
校验码图片生成
<img src="/servlet/randomImgCodeServl ...
-- by hqingjin83 -
校验码图片生成
唔。。。验证码无法显示啊
-- by hqingjin83






评论排行榜