11智能在线
新记
java怎么获取session
如题所述
举报该文章
相关建议 2016-08-09
在Servlet或者是在Struts1中获取当前用户的Session方法是:
HttpSession session = request.getSession(true);
注意:request的类型是:HttpServletRequest.
如果是在Struts2中的Action中获取Session.方法是:
Map session = ActionContext.getContext().getSession();
温馨提示:内容为网友见解,仅供参考
当前网址:
https://11.t2y.org/zz/8q48mmq8fvf4m4p4vs.html
其他看法
无其他回答
相似回答
大家正在搜
相关问题
spring mvc怎么获取session
js怎么获取session的值
js怎么获取session的值
js 中怎么获取session 值
struts中获取session
如何让php获取session的值
java获取session的值怎么使用
javascript怎么获取session