index.jsp 904 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <%--
  2. Created by IntelliJ IDEA.
  3. User: x'b'w
  4. Date: 2021/5/14
  5. Time: 14:04
  6. To change this template use File | Settings | File Templates.
  7. --%>
  8. <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  9. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  10. <%--查询--%>
  11. <%--删除--%>
  12. <html>
  13. <head>
  14. <title>链接数据库,获取来自数据库的数据</title>
  15. </head>
  16. <body>
  17. <table>
  18. <tr>
  19. <th>学号</th>
  20. <th>姓名</th>
  21. <th>操作</th>
  22. </tr>
  23. <%-- 输出查询语句--%>
  24. ${list}
  25. <c:forEach items="${list}" var="student">
  26. <tr>
  27. <td>${student.num}</td>
  28. <td>${student.name}</td>
  29. <td>
  30. <a href="student?method=delete&num=${student.num}">删除</a>
  31. <a href="student?method=findBynum&num=${student.num}">修改</a>
  32. </td>
  33. </tr>
  34. </c:forEach>
  35. </table>
  36. </body>
  37. </html>