SHARE
TWEET

Untitled

a guest Oct 19th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2.     pageEncoding="UTF-8"%>
  3. <%@ page import="java.util.List" %>
  4. <%@ page import="uml1.dto.Item" %>
  5. <%
  6.     // Sessionオブジェクトから検索結果を取り出す
  7.     List<Item> list = (List<Item>)session.getAttribute("result");
  8. %>
  9. <!DOCTYPE html>
  10. <html>
  11. <head>
  12. <meta charset="UTF-8">
  13. <title>検索結果</title>
  14. </head>
  15. <body>
  16.  
  17. <h1>検索結果</h1>
  18.  
  19. <table border="1">
  20. <thead>
  21. <tr>
  22.     <th>商品名</th><th>価格</th>
  23. </tr>
  24. </thead>
  25.  
  26. <tbody>
  27. <%
  28. for(Item item : list)
  29. {
  30. %>
  31. <tr>
  32. <td><%= item.getName() %></td>
  33. <td><%= item.getPrice() + "円" %></td>
  34. </tr>
  35. <%
  36. }
  37. %>
  38. </tbody>
  39.  
  40. </table>
  41.  
  42. </body>
  43. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top