Skip to content

Commit 9330d5f

Browse files
committed
Add: Requirement3-2 CREATE DONE
1 parent aa19e29 commit 9330d5f

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

java-webMVC.iws

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
</component>
66
<component name="ChangeListManager">
77
<list default="true" id="b8532e5e-d8f5-4e8c-a002-746704734daf" name="Changes" comment="">
8-
<change afterPath="$PROJECT_DIR$/src/main/java/jwp/controller/ShowQuestionController.java" afterDir="false" />
98
<change beforePath="$PROJECT_DIR$/java-webMVC.iws" beforeDir="false" afterPath="$PROJECT_DIR$/java-webMVC.iws" afterDir="false" />
10-
<change beforePath="$PROJECT_DIR$/src/main/java/jwp/controller/RequestMapping.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/jwp/controller/RequestMapping.java" afterDir="false" />
11-
<change beforePath="$PROJECT_DIR$/webapp/include/navigation.jspf" beforeDir="false" afterPath="$PROJECT_DIR$/webapp/include/navigation.jspf" afterDir="false" />
12-
<change beforePath="$PROJECT_DIR$/webapp/qna/form.jsp" beforeDir="false" afterPath="$PROJECT_DIR$/webapp/qna/form.jsp" afterDir="false" />
9+
<change beforePath="$PROJECT_DIR$/webapp/home.jsp" beforeDir="false" afterPath="$PROJECT_DIR$/webapp/home.jsp" afterDir="false" />
1310
</list>
1411
<option name="SHOW_DIALOG" value="false" />
1512
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -292,7 +289,7 @@
292289
<workItem from="1761730317572" duration="1356000" />
293290
<workItem from="1761813440661" duration="22235000" />
294291
<workItem from="1761983761744" duration="329000" />
295-
<workItem from="1762087694007" duration="6688000" />
292+
<workItem from="1762087694007" duration="8493000" />
296293
</task>
297294
<servers />
298295
</component>

src/main/java/jwp/controller/ShowQuestionController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class ShowQuestionController implements Controller {
1414
@Override
1515
public String execute(HttpServletRequest req, HttpServletResponse resp) throws IOException, SQLException {
1616
String questionIdParam = req.getParameter("questionId");
17-
if (questionIdParam == null || questionIdParam.isBlank()) {
17+
if (questionIdParam == null || questionIdParam.trim().isEmpty()) {
1818
resp.sendRedirect("/");
1919
return null;
2020
}

webapp/home.jsp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,12 @@
5959
<li>
6060
<div class="wrap">
6161
<div class="main">
62+
<c:url var="showQuestionUrl" value="/qna/show">
63+
<c:param name="questionId" value="${question.questionId}" />
64+
</c:url>
6265
<strong class="subject">
63-
<a href="qna/show?questionId=${question.questionId}">${question.title}</a>
66+
<%-- <a href="qna/show?questionId=${question.questionId}">${question.title}</a>--%>
67+
<a href="${showQuestionUrl}">${question.title}</a>
6468
</strong>
6569
<div class="auth-info">
6670
<i class="icon-add-comment"></i>
@@ -82,8 +86,6 @@
8286
</div>
8387
</li>
8488
</c:forEach>
85-
<%-- </div>--%>
86-
<%-- </li>--%>
8789
</ul>
8890
<div class="row">
8991
<div class="col-md-5"></div>
@@ -103,7 +105,8 @@
103105
</ul>
104106
</div>
105107
<div class="col-md-2 qna-write">
106-
<a href="./qna/form.html" class="btn btn-primary pull-right" role="button">질문하기</a>
108+
<%-- <a href="./qna/form.html" class="btn btn-primary pull-right" role="button">질문하기</a>--%>
109+
<a href="<c:url value='/qna/form'/>" class="btn btn-primary pull-right" role="button">질문하기</a>
107110
</div>
108111
</div>
109112
</div>

0 commit comments

Comments
 (0)