📄 book_show.jsp
字号:
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
</head>
<body>
<center>
<img src="<%=path%>/image/sa[1].gif" />
<h1>
你所选择的类型的图书如下:
</h1>
</center>
<br>
<center>
<s:iterator value="#request['book']" id="book">
<tr>
<td>
<table>
<tr>
<td>
书名:
<s:property value="#book.bookname" />
</td>
<td>
价格:
<s:property value="#book.price" />
</td>
<td>
现存数量:
<%--<s:property value="#book.picture"/>--%>
<s:property value="#book.quantity" />
</td>
</table>
</td>
<td>
<img
src="<%=path%>/image/book/<s:property value="#book.picture"/>">
<s:form action="addtocart.action" method="post" theme="simple">
<td>
数量:
<input type="text" name="quantity" value="" size="4"/>
<input type="hidden" value="<s:property value="#book.bookId"/>" name="bookId"/>
<input type="submit" value="加入购物车"/>
</td>
</s:form>
</td>
</tr>
</s:iterator>
</center>
<s:set name="pager" value="#request['pager']" />
<center>
<a
href="book_search.action?catalogId=<s:property value="catalogId"/>&& currentpage=1">首页</a>
<s:if test="#pager.hasfistpage">
[<a
href="book_search.action?catalogId=<s:property value="catalogId"/>&& currentpage=<s:property value="#pager.previorpage"/>">上一页</a>]
</s:if>
<s:if test="#pager.hasnextpage">
[<a
href="book_search.action?catalogId=<s:property value="catalogId"/>&& currentpage=<s:property value="#pager.nextpage"/>">下一页</a>]
</s:if>
<s:if test="#pager.lastpage">
[<a
href="book_search.action?catalogId=<s:property value="catalogId"/>&& currentpage=<s:property value="#pager.totalpage"/>">最后一页</a>]
</s:if>
<br>
总页数[
<s:property value="#pager.totalpage" />
] 当前页[
<s:property value="currentpage" />
]
<%--<s:form action="book_search.action" method="post" theme="simple">
<center>
图书类型:
<s:select list="#request['arr_catalogname']" name="catalog.catalogname"
value="#request['arr_catalogname']">
</s:select>
<s:submit type="image" src="http://localhost:8080/bookshop/image/b_search.gif"></s:submit>
</center>
</s:form>--%>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -