Sunny_Capt

JSP корзины пользователя

Oct 31st, 2019
1,260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.77 KB | None | 0 0
  1. <%@ import="my.package.ShoppingItem" %>
  2. <%@ import="java.util.Collection" %>
  3. <%@ contentType="text/html;charset=UTF-8" language="java"%>
  4. <jsp:useBean id="managed" class="my.package.ManagedBean" scope="session">
  5. <html>
  6. <head>
  7.         <meta charset="utf-8">
  8. </head>
  9. <body>
  10. <table>
  11.         <tr>
  12.                 <th>name</th>
  13.                 <th>price</th>
  14.                 <th>count</th>
  15.         </tr>
  16. <%
  17.        Collection<ShoppingItem> basket = mananged.getBasket();
  18.         for (ShoppingItem position: basket){%>
  19.                 <tr>
  20.                         <td><%= position.getName() %></td>
  21.                         <td><%= position.getPrice() %></td>
  22.                         <td><%= position.getCount() %></td>
  23.                 </tr>
  24.         <%}%>
  25. </table>
  26. </body>
Add Comment
Please, Sign In to add comment