ActionContext.getContext().getSession()
ActionContext.getContext().getSession() 获取的是session,然后用put存入相应的值,只要在session有效状态下,这个值一直可用
ActionContext.getContext().getSession() .put("键","要存放的值"); // 例如在user的setter和getter方法,要放的值相当于getUser()
相当于jsp里
<%=session=getAttribut("键")%>
************************************************************************************
--------------------------------------------------------------------------------------------------------------------------------------------
作者:Honey_Badger —— 觉得这文章好,点一下左下角
出处:http://tk55.cnblogs.com/
posted on 2016-11-04 14:19 Honey_Badger 阅读(928) 评论(0) 编辑 收藏 举报