showorder.jsp

来自「《J2EE企业级应用开发》一书的配套源代码」· JSP 代码 · 共 31 行

JSP
31
字号
<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.*" errorPage="error.jsp" %> 
<% String orderId=(String)request.getParameter("orderId").trim();
 out.println("订单号:-->"+orderId);
 Collection items=shoppingSession.getOrderLineItem(orderId);
 Iterator it=items.iterator();
%>
<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())
  {  
     LineItem pr=(LineItem)it.next();
  %>  
  <Tr>
  <td class="heading"><%=pr.getItemId()%></td>
  <td class="heading"><%=pr.getQuantity()%></td>
  <td class="heading"><%=pr.getUnitPrice()%></td>
  </Tr>
  <%}%>
</table>

<jsp:include page="footer.jsp" flush="true"/>
 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?