%--
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");
%>
<%=messages.getString("TitleBookCatalog")%>
<%@ 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);
%>
<%=messages.getString("CartAdded1")%> <%=book.getTitle()%> <%=messages.getString("CartAdded2")%>
<%
}
if (cart.getNumberOfItems() > 0) {
%>
<%=messages.getString("CartCheck")%>
<%=messages.getString("Buy")%>
<%
}
%>
<%=messages.getString("Choose")%>
<%
Collection c = bookDB.getBooks();
Iterator i = c.iterator();
while (i.hasNext()) {
BookDetails book = (BookDetails)i.next();
bookId = book.getBookId();
%>
<%=book.getTitle()%> |
<%=currency.getFormat()%>
|
<%=messages.getString("CartAdd")%> |
<%=messages.getString("By")%> <%=book.getFirstName()%>
<%=book.getSurname()%> |
<% } %>