struts2 session 解读
(编辑:jimmy 日期: 2024/11/13 浏览:2)
HttpSession < session = ServletActionContext.getRequest().getSession();
例:
public String findAll(){
HttpSession session = ServletActionContext.getRequest().getSession();
list = userService.find();
session.setAttribute("list", list);
return this.SUCCESS;
}
在jsp中如何得到session中的属性呢:
如下:
s:iterator value="#session.list" id="user"
s:property value="user.userid"
s:property value="user.firstname"
s:property value="user.lastname"
s:iterator