我的代码对于删除按钮运行良好,但是单击下载按钮时出现错误:
错误:-不知道如何遍历
中提供的“项目”
<table id="myInput" style="width:100%;float:left">
<thead>
<tr>
<th>Book Name</th>
<th>Author</th>
<th>Course</th>
<th>Download</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
<c:forEach items="${book}" var="approval">
<tr>
<center><td>${approval.bookName}</td></center>
<center><td>${approval.authorName}</td></center>
<center><td>${approval.courseName}</td></center>
<td>
<form action="downloadBook" method="GET">
<input type="hidden" value="${approval.bookName}" name="bname2"/>
<input type="submit" value="Download">
</form>
</td>
<td>
<form action="deleteBook" method="POST">
<input type="hidden" value="${approval.bookName}" name="bname"/>
<input type="hidden" value="${approval.courseName}" name="cname"/>
<input type="submit" value="Delete">
</form>
</td>
</tr>
</c:forEach>
</tbody>
</table>