📄 catalog.jsp
字号:
<%-- Copyright 2001 Sun Microsystems, Inc. All Rights Reserved. This software is the proprietary information of Sun Microsystems, Inc. Use is subject to license terms. --%><%@ taglib uri="/struts-bean" prefix="bean" %><%@ taglib uri="/struts-logic" prefix="logic" %><%@ include file="initdestroy.jsp" %><jsp:useBean id="currency" class="util.Currency" scope="application"> <jsp:setProperty name="currency" property="locale" value="<%=request.getLocale()%>"/></jsp:useBean><jsp:useBean id="cart" class="cart.ShoppingCart" scope="session"/><logic:present parameter="Add"> <bean:parameter id="bookId" name="Add" /> <jsp:setProperty name="bookDB" property="bookId" value="<%=bookId%>" /> <bean:define id="book" name="bookDB" property="bookDetails" type="database.BookDetails"/> <% cart.add(bookId, book); %> <p><h3><font color="red" size="+2"> You just added <em><jsp:getProperty name="book" property="title"/></em> to your shopping cart.</font></h3></logic:present><logic:greaterThan name="cart" property="numberOfItems" value="0" > <p><strong><a href="<%=request.getContextPath()%>/showcart">Check Shopping Cart</a> <a href="<%=request.getContextPath()%>/cashier">Buy Your Books</a></p></strong></logic:greaterThan><br> <br> <h3>Please choose from our selections:</h3><center><table><logic:iterate name="bookDB" property="books" id="book" type="database.BookDetails"> <bean:define id="bookId" name="book" property="bookId" type="java.lang.String"/> <tr> <td bgcolor="#ffffaa"> <a href="<%=request.getContextPath()%>/bookdetails?bookId=<%=bookId%>"><strong><jsp:getProperty name="book" property="title"/> </strong></a></td> <td bgcolor="#ffffaa" rowspan=2> <jsp:setProperty name="currency" property="amount" value="<%=book.getPrice()%>"/> <jsp:getProperty name="currency" property="format"/> </td> <td bgcolor="#ffffaa" rowspan=2> <a href="<%=request.getContextPath()%>/catalog?Add=<%=bookId%>"> Add to Cart </a></td></tr> <tr> <td bgcolor="#ffffff"> by <em><jsp:getProperty name="book" property="firstName"/> <jsp:getProperty name="book" property="surname"/></em></td></tr></logic:iterate></table></center>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -