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
例:
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