This repository has been archived on 2025-01-14. You can view files and clone it, but cannot push or open issues/pull-requests.
2024-12-21 01:22:44 +08:00
|
|
|
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
|
|
|
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>Computer List</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1>Computer List</h1>
|
|
|
|
<table border="1">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>ID</th>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Price</th>
|
|
|
|
<th>Stock</th>
|
|
|
|
<th>Actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<c:forEach var="computer" items="${computers}">
|
|
|
|
<tr>
|
|
|
|
<td>${computer.id}</td>
|
|
|
|
<td>${computer.name}</td>
|
|
|
|
<td>${computer.price}</td>
|
|
|
|
<td>${computer.stock}</td>
|
|
|
|
<td>
|
2024-12-21 01:58:50 +08:00
|
|
|
<a href="/editComputer?id=${computer.id}">Edit</a> |
|
2024-12-21 16:04:38 +08:00
|
|
|
<a href="/deleteComputer?id=${computer.id}">Delete</a> |
|
|
|
|
<a href="/cart?action=add&id=${computer.id}">加购</a>
|
2024-12-21 01:22:44 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</c:forEach>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2024-12-21 16:04:38 +08:00
|
|
|
<hr>
|
|
|
|
<p style="color: red;">${requestScope.msg}</p>
|
|
|
|
<a href="/cart?action=list">我的购物车</a>
|
2024-12-21 01:22:44 +08:00
|
|
|
<br/>
|
2024-12-21 01:42:43 +08:00
|
|
|
<a href="/addComputer">Add New Computer</a>
|
2024-12-21 12:40:35 +08:00
|
|
|
<br>
|
|
|
|
<a href="/">主页</a>
|
2024-12-21 01:22:44 +08:00
|
|
|
</body>
|
|
|
|
</html>
|