list_student.jsp
来自「java 框架核心技术编程」· JSP 代码 · 共 87 行
JSP
87 行
<%@ page language="java" pageEncoding="GBK"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<html:html lang="true">
<head>
<title>学生选课系统——Hibernate 多对多实现</title>
</head>
<body>
<center>
<h1>
学生选课系统 —— Struts + Hibernate
</h1>
<hr>
<br>
<h3>
<a href="insert_student.jsp">增加新学生</a>
<a href="course.do?type=0&status=selectall">课程列表</a>
</h3>
<html:form action="student.do" method="post">
输入检索关键字:
<input type="text" name="keyWord">
<input type="hidden" name="status" value="selectlike">
<input type="submit" value="查询">
</html:form>
<logic:present name="all" scope="request">
<table width="100%" border="1">
<tr>
<td>
编号
</td>
<td>
姓名
</td>
<td>
年龄
</td>
<td>
性别
</td>
<td colspan="4">
操作
</td>
</tr>
<logic:iterate id="stu" name="all" scope="request">
<tr>
<td>
${stu.sid}
</td>
<td>
${stu.name}
</td>
<td>
${stu.age}
</td>
<td>
${stu.sex}
</td>
<td>
<a href="student.do?status=selectstudentcourse&type=1&sid=${stu.sid}">查看报名的课程</a>
</td>
<td>
<a href="course.do?status=choosecourse&type=0&sid=${stu.sid}">选课</a>
</td>
<td>
<a href="student.do?status=selectid&type=1&sid=${stu.sid}">更新</a>
</td>
<td>
<a href="student.do?status=delete&type=1&sid=${stu.sid}">删除</a>
</td>
</tr>
</logic:iterate>
</table>
</logic:present>
<logic:notPresent name="all" scope="request">
<h2>
没有任何数据!
</h2>
</logic:notPresent>
</center>
</body>
</html:html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?