<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="com.lovecoding.mvc.dao.BookDao" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.Map" %><%--
  Created by IntelliJ IDEA.
  User: lc
  Date: 2023-04-01
  Time: 上午 11:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<table style="width: 500px; margin: 0 auto;" border="1" >
    <tr>
        <td>id</td>
        <td>名字</td>
        <td>价格</td>
        <td>库存</td>
        <td>操作</td>
    </tr>
    <c:forEach items="${books}" var="book">
        <tr>
            <td>${book.book_id}</td>
            <td>${book.book_name}</td>
            <td>${book.price}</td>
            <td>${book.stock}</td>
            <td>

                <a href=""> 删除 </a>
                <a href="<%=request.getContextPath()%>/book/${book.book_id}"> 修改 </a>

            </td>
        </tr>
    </c:forEach>
</table>
</body>
</html>
