cart.jsp

来自「100多M的J2EE培训内容」· JSP 代码 · 共 36 行

JSP
36
字号
<html>
<head>
  <title>Enrollment Cart Page</title>
</head>

<%@ page errorPage="error.jsp" %>
<%@ page import="java.util.*,day21ex.course.CourseItem"%>
 
<h3>Your enrollment cart</h3>
<table  border=1>  
   <tr>
     <th><b>Course Name</b></th>      
     <th><b>Fee</b><th>
   </tr>
    <%
      Collection cartItemList 
          = (java.util.Collection)session.getAttribute("cartItemList");
      if ( cartItemList != null ) {
        Iterator it = cartItemList.iterator();
        while( it.hasNext() ) {
           CourseItem item=null;
           item=(CourseItem)it.next();
    %>
     <tr>
        <td><%=item.getName()%></td>
        <td align="right" ><%=java.text.NumberFormat.getCurrencyInstance().format(item.getFee())%></td>        
     </tr>
     <%
         }
       }
     %>

</table>
<a href="/ursday21ex/URSControllerServlet?pageName=orderPage" >Place Order</a>
</body>
</html>

⌨️ 快捷键说明

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