enrollment.jsp
上传用户:dinglihq
上传日期:2013-02-04
资源大小:99958k
文件大小:1k
源码类别:

Java编程

开发平台:

Java

  1. <!-- day 21 exercise -->
  2. <html>
  3. <head>
  4.   <title>Enrollments Page</title>
  5. </head>
  6. <%@ page errorPage="error.jsp" %>
  7. <%@ page import="java.util.*,day21ex.enrollment.EnrollmentDetails"%>
  8. <h3>Enrollments List</h3>
  9.         
  10. <table border=1>        
  11.   <tr>
  12.     <th><b>Course Id</b></th>
  13.     <th><b>Course Name</b></th>
  14.   </tr>
  15.     <%
  16.       Collection enrollments 
  17.         = (java.util.Collection) session.getAttribute("enrollmentsList");
  18.       if ( enrollments != null ) {
  19.       Iterator it = enrollments.iterator();
  20.       while ( it != null && it.hasNext() ) {
  21.          EnrollmentDetails enrollmentDetails = (EnrollmentDetails)it.next();
  22.     %>
  23.      <tr>
  24.        <td><%= enrollmentDetails.getCourseId() %> </td>
  25.        <td> <%= enrollmentDetails.getCourseName() %> </td>
  26.        </tr>
  27.      <% 
  28.          }
  29.        }
  30.       %>
  31. </table>
  32. Pls click here to browse the <a href="/ursday21ex/URSControllerServlet?pageName=catalogPage">catalog page</a>
  33. </body>
  34. </html>