📄 browse.jsp
字号:
<%@ page contentType="text/html;charset=GB2312" %>
<%@page import="jnestore.javabeans.*" %>
<%@page import="java.util.*" %>
<%@page import="java.io.*" %>
<%@ page errorPage="error.jsp" %>
<html>
<body>
<%@ include file="header.jsp" %>
<a href="<%=response.encodeURL("logout.jsp")%>">注销</a>
<a href="<%=response.encodeURL("login.jsp")%>">登录</a>
<h1>Catalog</h1>
<br>Here are the products we offer:
<br><br>
<table border=1>
<tr>
<td>SKU code</td>
<td>Product</td>
<td>Price</td>
<td>Description</td>
<td></td>
</tr>
<%
Catalog cat = new Catalog();
ArrayList list = cat.getAllItems();
Iterator i = list.iterator();
while(i.hasNext()) {
ItemInfo item = (ItemInfo)i.next(); %>
<tr>
<td><%=item.getSku()%></td>
<td><%=item.getName()%></td>
<td>$<%=item.getPrice()%></td>
<td><%=item.getDescription()%></td>
<td><A HREF="<%=response.encodeURL("cart.jsp?operation=addItem&sku=" + item.getSku())%>">[add]</A></td>
</tr>
<% } %>
</table>
<jsp:include page="shoppingCart.jsp"/>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -