This repository has been archived on 2025-01-14. You can view files and clone it, but cannot push or open issues/pull-requests.
computer-web/src/main/webapp/userList.jsp

38 lines
1.2 KiB
Plaintext
Raw Normal View History

2024-12-20 22:35:13 +08:00
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.util.List" %>
<%@ page import="example.model.User" %>
<html>
<head>
<title>用户列表</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css">
</head>
<body>
<h1>用户列表</h1>
<form action="userList" method="get">
<div class="form-group">
<input type="text" class="form-control" name="query" placeholder="请输入用户名进行查询" value="${query}">
<button type="submit" class="btn btn-primary">查询</button>
</div>
</form>
<table border="1" class="table table-striped">
<tr>
<th>ID</th>
<th>用户名</th>
<th>密码</th>
</tr>
<c:forEach items="${userList}" var="user">
<tr>
<td>${user.id}</td>
<td>${user.username}</td>
<td>${user.password}</td>
</tr>
</c:forEach>
</table>
<br>
当前第 ${currentPage} 页,共 ${totalPages} 页
<div class="pagination-container">
${pageLinks}
</div>
</body>
</html>