list_course.jsp
来自「java 框架核心技术编程」· JSP 代码 · 共 86 行
JSP
86 行
<%@ 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_course.jsp">添加新课程</a>
<a href="student.do?type=0&status=selectall">学生列表</a>
</h3>
<html:form action="course.do" method="post">
输入查询关键字:
<input type="text" name="keyWord">
<input type="hidden" name="status" value="selectlike">
<input type="hidden" name="type" value="0">
<input type="submit" value="查询">
</html:form>
<logic:present name="all" scope="request">
<table border="1" width="100%">
<tr>
<td>
编号
</td>
<td>
课程名称
</td>
<td>
任课教师
</td>
<td>
学分
</td>
<td colspan="3">
操作
</td>
</tr>
<logic:iterate id="cre" scope="request" name="all">
<tr>
<td>
${cre.cid}
</td>
<td>
${cre.name}
</td>
<td>
${cre.teacher}
</td>
<td>
${cre.creditHour}
</td>
<td>
<a
href="course.do?status=selectcoursestudent&type=1&cid=${cre.cid}">参加学生列表</a>
</td>
<td>
<a href="course.do?status=selectid&type=1&cid=${cre.cid}">修改</a>
</td>
<td>
<a href="course.do?status=delete&type=1&cid=${cre.cid}">删除</a>
</td>
</tr>
</logic:iterate>
</table>
</logic:present>
<logic:notPresent name="all" scope="request">
<h3>
没有任何数据!
</h3>
</logic:notPresent>
</center>
</body>
</html:html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?