不能显示学生列表信息
更改的代码如下:求大神指点
// 查询所有学生的动作
public String query() {
StudentsDAO studentsDAO = new StudentDAOImpl();
List<Students> list = studentsDAO.queryAllStudents();
// 放进session中
if (list != null && list.size() > 0) {
session.setAttribute("students_list", list);
}
System.out.println(list.size());
return "query_success";
}
<package name="students" namespace="/students" extends="default">
<action name="*_*" class="com.mr.action.{1}Action" method="{2}">
<result name="query_success">/students/Students_query_success.jsp</result>
</action>
</package>
<!-- #代表上下文栈 --> <s:iterator value="#session.students_list" var="stu"> <tr class="list"> <td><s:property value="#stu.sid"/></td> <td><s:property value="#stu.sname"/></td> <td><s:property value="#stu.gender"/></td> <td><s:date name="#stu.birthday" format="yyyy年MM月dd日"/></td> <td><s:property value="#stu.address"/></td> <td><a href="#">删除</a></td> </tr> </s:iterator>
{ level:2, name:"学生列表", ico:"images/icon_default.gif",link:"students/Students_query.action"},