📄 showitems.jsp
字号:
<jsp:include page="header.jsp" flush="true"/>
<jsp:include page="sidebar.jsp" flush="true"/>
<jsp:useBean id="shoppingSession" scope="session" class="com.j2eeapp.cdstore.bean.ShoppingSession" />
<%@ page contentType="text/html;charset=gb2312" import="java.util.*,com.j2eeapp.cdstore.vo.*" %>
<% String category=(String)request.getParameter("category");
out.println(category);
Collection product=shoppingSession.getProductByCategory(category);
Iterator it=product.iterator();
if(it.hasNext()){
%>
<table border="0" cellspacing="0" cellpadding="2" width="500">
<tr>
<th background="images/titlebar_stretch.gif" valign="top" class="title" align="left">名称 </th>
<th background="images/titlebar_stretch.gif" align="right" valign="center" class="title">描述 </th>
<th background="images/titlebar_stretch.gif" align="right" valign="center" class="title">添加到购物车 </th>
</tr>
<% while(it.hasNext())
{
ProductDescription pr=(ProductDescription)it.next();
%>
<Tr>
<td><a href="showdetails.jsp?productId=<%=pr.getProductId()%>" class="heading">
<%=pr.getName()%></a></td>
<td><%=pr.getDescription()%></td>
<td><a href="additem?itemId=<%=pr.getItemId()%>" class="heading">添加</a></td>
</Tr>
<%}%>
</table>
<%}
else
{%>
<br>建设中<a href="category.jsp">返回</a>
<%}%>
<jsp:include page="footer.jsp" flush="true"/>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -