📄 catalog.txt
字号:
<%-- Copyright 2001 Sun Microsystems, Inc. All Rights Reserved. This software is the proprietary information of Sun Microsystems, Inc. Use is subject to license terms. --%><%@ include file="initdestroy.jsp" %><%@ page import="java.util.*" %><% ResourceBundle messages = (ResourceBundle)session.getAttribute("messages");%><jsp:useBean id="bookDB" class="database.BookDB" scope="page" > <jsp:setProperty name="bookDB" property="database" value="<%=bookDBEJB%>" /></jsp:useBean><jsp:useBean id="cart" scope="session" class="cart.ShoppingCart"/><jsp:useBean id="currency" class="util.Currency" scope="session"> <jsp:setProperty name="currency" property="locale" value="<%=request.getLocale()%>"/></jsp:useBean><html> <head><title><%=messages.getString("TitleBookCatalog")%></title></head> <%@ include file="banner.jsp" %><% // Additions to the shopping cart String bookId = request.getParameter("Add"); if (bookId != null) { bookDB.setBookId(bookId); BookDetails book = bookDB.getBookDetails(); cart.add(bookId, book);%><p><h3> <font color="red"> <%=messages.getString("CartAdded1")%> <i><%=book.getTitle()%></i> <%=messages.getString("CartAdded2")%></font></h3><%}if (cart.getNumberOfItems() > 0) {%><p><strong><a href="<%=request.getContextPath()%>/showcart"><%=messages.getString("CartCheck")%></a> <a href="<%=request.getContextPath()%>/cashier"><%=messages.getString("Buy")%></a></p></strong><%}%><br> <br> <h3><%=messages.getString("Choose")%></h3> <center><table><% Collection c = bookDB.getBooks(); Iterator i = c.iterator(); while (i.hasNext()) { BookDetails book = (BookDetails)i.next(); bookId = book.getBookId();%><tr> <td bgcolor="#ffffaa"> <a href="<%=request.getContextPath()%>/bookdetails?bookId=<%=bookId%>"><strong><%=book.getTitle()%> </strong></a></td> <td bgcolor="#ffffaa" rowspan=2> <jsp:setProperty name="currency" property="amount" value="<%=book.getPrice()%>"/><%=currency.getFormat()%><td bgcolor="#ffffaa" rowspan=2> <a href="<%=request.getContextPath()%>/catalog?Add=<%=bookId%>"> <%=messages.getString("CartAdd")%> </a></td></tr> <tr> <td bgcolor="#ffffff"> <%=messages.getString("By")%> <em><%=book.getFirstName()%> <%=book.getSurname()%></em></td></tr><% } %></table></center></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -