struts2 session interpretation

  • 2020-05-10 18:37:48
  • OfStack

HttpSession < session = ServletActionContext. getRequest (.) getSession ();
               

                public String findAll(){
        HttpSession session = ServletActionContext.getRequest().getSession();
                list = userService.find();
        session.setAttribute("list", list);
                return this.SUCCESS;
        }
How does                 get the properties of session in jsp?
             

                s:iterator value="#session.list" id="user"
                        s:property value="user.userid"
                        s:property value="user.firstname"
                        s:property value="user.lastname"
                s:iterator

Related articles: