首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

struts2中运用request

2012-10-09 
struts2中应用requestActionContext ctx ActionContext.getContext()HttpServletRequest request (Ht

struts2中应用request
ActionContext ctx = ActionContext.getContext();

HttpServletRequest request = (HttpServletRequest) ctx
.get(ServletActionContext.HTTP_REQUEST);

HttpServletResponse response = (HttpServletResponse) ctx
.get(ServletActionContext.HTTP_RESPONSE);

(注:request是jsp中九大内置对象之一,servlet中可以应用,而struts中不能自动应用)

热点排行