struts2获取servlet的api
2021-02-09 06:19
标签:struts2获取servlet的api struts2获取servlet的api 标签:struts2获取servlet的api 原文地址:http://blog.51cto.com/13579086/2086396
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
文章链接:http://soscw.com/index.php/essay/52979.html