From dc448386fcdbd9486efd8ed9518317d153492d52 Mon Sep 17 00:00:00 2001 From: daniel LEE Date: Thu, 26 Oct 2023 17:58:29 +0900 Subject: [PATCH] =?UTF-8?q?JSTL=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demo/controller/JSPController.java | 12 +- src/main/webapp/WEB-INF/views/index.jsp | 105 ++++++++++-------- 2 files changed, 68 insertions(+), 49 deletions(-) diff --git a/src/main/java/com/example/demo/controller/JSPController.java b/src/main/java/com/example/demo/controller/JSPController.java index 427cd05..c7e1fc3 100644 --- a/src/main/java/com/example/demo/controller/JSPController.java +++ b/src/main/java/com/example/demo/controller/JSPController.java @@ -33,9 +33,17 @@ public class JSPController { @GetMapping("/index.do") public String index(Model model) { - - return "index"; + List list = new ArrayList(); + for ( int i = 0; i < 8; i++) { + HashMap map = new HashMap(); + map.put( "filepath", "/img/52e11fb7-f206-48d8-b13d-e010e852fd6a.jpeg" ); + list.add(map); + } + + model.addAttribute("list", list); + + return "index"; } @GetMapping("/list.do") diff --git a/src/main/webapp/WEB-INF/views/index.jsp b/src/main/webapp/WEB-INF/views/index.jsp index 964d974..4ed1589 100644 --- a/src/main/webapp/WEB-INF/views/index.jsp +++ b/src/main/webapp/WEB-INF/views/index.jsp @@ -58,10 +58,15 @@
+ + + + +
- ... + ...
@@ -76,19 +81,25 @@
-
-
+
+ + + + + + + + Sale badge
Sale
- + Product image ... - + Product details
- + Product name
Special Item
- + Product reviews
@@ -96,12 +107,12 @@
- + Product price $20.00 $18.00
- + Product actions @@ -109,21 +120,21 @@
- + Sale badge
Sale
- + Product image ... - + Product details
- + Product name
Sale Item
- + Product price $50.00 $25.00
- + Product actions @@ -131,14 +142,14 @@
- + Product image ... - + Product details
- + Product name
Popular Item
- + Product reviews
@@ -146,11 +157,11 @@
- + Product price $40.00
- + Product actions @@ -158,21 +169,21 @@
- + Sale badge
Sale
- + Product image ... - + Product details
- + Product name
Sale Item
- + Product price $50.00 $25.00
- + Product actions @@ -180,18 +191,18 @@
- + Product image ... - + Product details
- + Product name
Fancy Product
- + Product price $120.00 - $280.00
- + Product actions @@ -199,16 +210,16 @@
- + Sale badge
Sale
- + Product image ... - + Product details
- + Product name
Special Item
- + Product reviews
@@ -216,12 +227,12 @@
- + Product price $20.00 $18.00
- + Product actions @@ -229,14 +240,14 @@
- + Product image ... - + Product details
- + Product name
Popular Item
- + Product reviews
@@ -244,16 +255,16 @@
- + Product price $40.00
- + Product actions
-
+
-->