Skip to content

Commit

Permalink
9월 25일 수
Browse files Browse the repository at this point in the history
  • Loading branch information
javajigi committed Sep 25, 2013
1 parent 5f4151a commit fbb59fd
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/main/java/org/nhnnext/web/BoardController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.nhnnext.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class BoardController {
@RequestMapping("/board/form")
public String form() {
return "form";
}

@RequestMapping(value="/board", method=RequestMethod.POST)
public String create(String id, String article) {
System.out.println("id : " + id + " article : " + article);
return "redirect:/";
}
}
19 changes: 19 additions & 0 deletions webapp/form.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1> 글쓰기 화면 임다</h1>
<div>
<form action="/board" method="post">
제목 : <input type="text" name="title" size=40> <br />
<textarea name="contents" rows="10" cols="50">글자를 미리 넣어보자</textarea><br />
<input type="submit" value="보내기">
</form>
</div>
</body>
</html>
12 changes: 12 additions & 0 deletions webapp/index.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<a href="/board/form">글쓰기</a>
</body>
</html>

0 comments on commit fbb59fd

Please sign in to comment.