session。setAttribute(“use”,use)
如何让在其它的action中取得use
如何获取session呢
LZ以后问这类问题 提前搜枯闭索下
struts2已经把session封装起来 想使用session需要继承歼败岁ActionSupport类 然后实现SessionAware接口 然后再实现他的setSession方法 就会氏睁从参数列表中获得一个MAP形式的SESSION 基本跟普通SESSION一样
不建议用LS那种方法
"/>
先获得session:
HttpSession session =
ActionServletContext.getRequest().getSession
然兄笑后:session.getAttribute(""羡逗含);就指蠢行
session.getAttribute("use");就行了
一般提倡实现SessionAware接口
