struts2 中ActionContext.getContext().getSession().put("",和HttpSession有什么区别吗

来源:学生作业帮助网 编辑:六六作业网 时间:2024/05/24 14:17:51
struts2中ActionContext.getContext().getSession().put("",和HttpSession有什么区别吗struts2中ActionContext.getCo

struts2 中ActionContext.getContext().getSession().put("",和HttpSession有什么区别吗
struts2 中ActionContext.getContext().getSession().put("",和HttpSession有什么区别吗

struts2 中ActionContext.getContext().getSession().put("",和HttpSession有什么区别吗
没区别,前一个是将值保存到session中,效果等同于session.setAttribute("",""),前者就是struts2对后者的一个封装,把session,request,application全都放到了actioncontext()容器中了.