RegServlet
// 保存到 session request.getSession().setAttribute("user", user);
userinfo.jsp
// 读取 session <jsp:useBean id="user" class="entity.User" scope="session"/> <jsp:getProperty name="user" property="username"/>