public String execute() {
if(studentService.loginVerify(sid, spassword)){
Student student = new Student();
student.setSid(sid);
student.setSpassword(spassword);
student.setSex(sex);
student.setSname(sname);
session.put("student", student);
return "success";
} else {
super.addActionError("用户名或密码不正确!");
return INPUT;
}
}
<% Student student=(Student)request.getSession().getAttribute("student");%>
<h3>学号:<%=student.getSid()%></h3><br>
<h3>姓名:<%=student.getSname()%></h3><br>
<h3>性别:<%=student.getSex()%></h3><br>
<h3>性别:<%=student.getSpassword()%></h3><br>