From 20a409954959081dca4749ed893b72bff4e83827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A4=EC=A0=95?= <70215620+yunjeongiya@users.noreply.github.com> Date: Fri, 5 Apr 2024 21:22:24 +0900 Subject: [PATCH 1/8] =?UTF-8?q?feat:=20=EC=9A=94=EA=B5=AC=EC=82=AC?= =?UTF-8?q?=ED=95=AD=201:=20HomeController?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/jwp/controller/HomeController.java | 22 +++++++++++++++++++ webapp/{index.html => index.jsp} | 4 ++++ webapp/qna/show.html | 2 +- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 src/main/java/jwp/controller/HomeController.java rename webapp/{index.html => index.jsp} (97%) diff --git a/src/main/java/jwp/controller/HomeController.java b/src/main/java/jwp/controller/HomeController.java new file mode 100644 index 0000000..6d097e0 --- /dev/null +++ b/src/main/java/jwp/controller/HomeController.java @@ -0,0 +1,22 @@ +package jwp.controller; + +import core.db.MemoryUserRepository; +import jwp.model.User; +import org.apache.coyote.Request; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +@WebServlet("/") +public class HomeController extends HttpServlet { + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + RequestDispatcher rd = request.getRequestDispatcher("home.jsp"); + rd.forward(request, response); + } +} diff --git a/webapp/index.html b/webapp/index.jsp similarity index 97% rename from webapp/index.html rename to webapp/index.jsp index 74f10ab..60cfc3b 100644 --- a/webapp/index.html +++ b/webapp/index.jsp @@ -1,3 +1,7 @@ +// jsp +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +// jstl +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> diff --git a/webapp/qna/show.html b/webapp/qna/show.html index 740acd1..72fa33d 100644 --- a/webapp/qna/show.html +++ b/webapp/qna/show.html @@ -91,7 +91,7 @@

객체지향에서 가장 중요하다고 생각하는 것
  • - 목록 + 목록
  • From dacbd0f2db951ae579e9f43e5056732ba14cd7c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A4=EC=A0=95?= <70215620+yunjeongiya@users.noreply.github.com> Date: Fri, 5 Apr 2024 21:34:57 +0900 Subject: [PATCH 2/8] =?UTF-8?q?feat:=20=EC=9A=94=EA=B5=AC=EC=82=AC?= =?UTF-8?q?=ED=95=AD=202:=20=EC=A4=91=EB=B3=B5=EB=90=9C=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webapp/include/header.jspf | 7 +++ webapp/include/navigation.jspf | 42 +++++++++++++++ webapp/index.jsp | 59 ++------------------- webapp/qna/form.html | 80 ---------------------------- webapp/qna/form.jsp | 34 ++++++++++++ webapp/qna/{show.html => show.jsp} | 56 ++------------------ webapp/user/form.html | 85 ------------------------------ webapp/user/form.jsp | 39 ++++++++++++++ webapp/user/list.jsp | 54 +------------------ webapp/user/login.html | 74 -------------------------- webapp/user/login.jsp | 29 ++++++++++ webapp/user/login_failed.html | 77 --------------------------- webapp/user/login_failed.jsp | 32 +++++++++++ 13 files changed, 195 insertions(+), 473 deletions(-) create mode 100644 webapp/include/header.jspf create mode 100644 webapp/include/navigation.jspf delete mode 100644 webapp/qna/form.html create mode 100644 webapp/qna/form.jsp rename webapp/qna/{show.html => show.jsp} (73%) delete mode 100644 webapp/user/form.html create mode 100644 webapp/user/form.jsp delete mode 100644 webapp/user/login.html create mode 100644 webapp/user/login.jsp delete mode 100644 webapp/user/login_failed.html create mode 100644 webapp/user/login_failed.jsp diff --git a/webapp/include/header.jspf b/webapp/include/header.jspf new file mode 100644 index 0000000..1854784 --- /dev/null +++ b/webapp/include/header.jspf @@ -0,0 +1,7 @@ + + + + KUIT + + + \ No newline at end of file diff --git a/webapp/include/navigation.jspf b/webapp/include/navigation.jspf new file mode 100644 index 0000000..fc80dd5 --- /dev/null +++ b/webapp/include/navigation.jspf @@ -0,0 +1,42 @@ + + \ No newline at end of file diff --git a/webapp/index.jsp b/webapp/index.jsp index 60cfc3b..74255b2 100644 --- a/webapp/index.jsp +++ b/webapp/index.jsp @@ -1,59 +1,10 @@ -// jsp <%@ page contentType="text/html;charset=UTF-8" language="java" %> -// jstl <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> - - - - KUIT - - - +<%@ include file="include/navigation.jspf"%> - - +<%@ include file="include/navigation.jspf" %>

    Q&A

    @@ -62,7 +13,7 @@
    - 객체지향에서 가장 중요하다고 생각하는 것이 무엇인가요? + 객체지향에서 가장 중요하다고 생각하는 것이 무엇인가요?
    @@ -80,7 +31,7 @@ diff --git a/webapp/qna/form.html b/webapp/qna/form.html deleted file mode 100644 index db01fcd..0000000 --- a/webapp/qna/form.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - KUIT - - - - - - - -
    -
    -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    - -
    - -
    -
    -
    - - - - - \ No newline at end of file diff --git a/webapp/qna/form.jsp b/webapp/qna/form.jsp new file mode 100644 index 0000000..eda0ed9 --- /dev/null +++ b/webapp/qna/form.jsp @@ -0,0 +1,34 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> + + + <%@ include file="../include/navigation.jspf" %> + + <%@ include file="../include/header.jspf" %> +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    + +
    + +
    +
    +
    + + + + + \ No newline at end of file diff --git a/webapp/qna/show.html b/webapp/qna/show.jsp similarity index 73% rename from webapp/qna/show.html rename to webapp/qna/show.jsp index 72fa33d..df08459 100644 --- a/webapp/qna/show.html +++ b/webapp/qna/show.jsp @@ -1,56 +1,10 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> - - - - KUIT - - - - - - - +<%@ include file="../include/navigation.jspf" %> + +<%@ include file="../include/header.jspf" %>

    객체지향에서 가장 중요하다고 생각하는 것이 무엇인가요?

    diff --git a/webapp/user/form.html b/webapp/user/form.html deleted file mode 100644 index 038f2ca..0000000 --- a/webapp/user/form.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - KUIT - - - - - - - -
    - -
    - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    - -
    -
    -
    - - - - - \ No newline at end of file diff --git a/webapp/user/form.jsp b/webapp/user/form.jsp new file mode 100644 index 0000000..00eff69 --- /dev/null +++ b/webapp/user/form.jsp @@ -0,0 +1,39 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> + + +<%@ include file="../include/navigation.jspf" %> + +<%@ include file="../include/header.jspf" %> +
    + +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + +
    +
    +
    + + + + + \ No newline at end of file diff --git a/webapp/user/list.jsp b/webapp/user/list.jsp index 8b5ea68..0146405 100644 --- a/webapp/user/list.jsp +++ b/webapp/user/list.jsp @@ -1,60 +1,10 @@ <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> - - - - - KUIT - - - +<%@ include file="../include/navigation.jspf" %> - -