首页 > Windows开发 > 详细

struts2获取servlet的api

时间:2018-03-14 12:38:03      阅读:61      评论:0      收藏:0      [点我收藏+]

标签:struts2获取servlet的api

public class Demo1Action extends ActionSupport {
public String execute(){
ServletContext application = ServletActionContext.getServletContext();
HttpServletRequest request = ServletActionContext.getRequest();
HttpServletResponse response = ServletActionContext.getResponse(); HttpSession session = request.getSession();
System.out.println(application);
System.out.println(session);
System.out.println(request);
System.out.println(response);
return SUCCESS;
}
}

struts2获取servlet的api

标签:struts2获取servlet的api

原文:http://blog.51cto.com/13579086/2086396

(0)
(0)
   
举报
评论 一句话评论(0
0条  
登录后才能评论!
© 2014 bubuko.com 版权所有 鲁ICP备09046678号-4
打开技术之扣,分享程序人生!
             

鲁公网安备 37021202000002号