ServletActionContext.getRequest().getSession() 和 ActionContext.getContext().getSession()的区别
生活随笔
收集整理的這篇文章主要介紹了
ServletActionContext.getRequest().getSession() 和 ActionContext.getContext().getSession()的区别
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
ServletActionContext.getRequest().getSession() 和 ActionContext.getContext().getSession()
ActionContext.getContext().getSession();
這個(gè)方法獲取的session是struts封裝過的一個(gè)Map類型的session,只能調(diào)用put()方法緩存數(shù)據(jù)。
ServletActionContext.getRequest().getSession();
這個(gè)方法獲取的session是原生的session,可以調(diào)用setAttribute()方法。
總結(jié)
以上是生活随笔為你收集整理的ServletActionContext.getRequest().getSession() 和 ActionContext.getContext().getSession()的区别的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 自己做的网页怎么注销(自己做的网页怎么注
- 下一篇: 安卓4.03版本可以用的软件(安卓4.0