Mercurial > hg > Database > jungle-network
comparison src/main/java/app/bbs/thinks/createAttributeMatrix.java @ 165:b3d5fbe95b9a
Create Folder Method
author | tatsuki |
---|---|
date | Mon, 28 Jul 2014 14:09:54 +0900 |
parents | |
children | d483caeabffc |
comparison
equal
deleted
inserted
replaced
164:cef31516e2e5 | 165:b3d5fbe95b9a |
---|---|
1 package app.bbs.thinks; | |
2 | |
3 import java.io.PrintWriter; | |
4 | |
5 import javax.servlet.http.HttpServlet; | |
6 import javax.servlet.http.HttpServletRequest; | |
7 import javax.servlet.http.HttpServletResponse; | |
8 | |
9 import app.bbs.NetworkBulletinBoard; | |
10 | |
11 public class createAttributeMatrix extends HttpServlet | |
12 { | |
13 private final NetworkBulletinBoard bbs; | |
14 private static final String PARAM_BOARD_NAME = "bname"; | |
15 private static final String PARAM_BOARD_MSGID = "uuid"; | |
16 private static final String PARAM_BOARD_AUTHOR = "author"; | |
17 private static final String PARAM_BOARD_MESSAGE= "msg"; | |
18 private static final String PARAM_BOARD_EDITKEY = "key"; | |
19 | |
20 private static final long serialVersionUID = 1L; | |
21 | |
22 public createAttributeMatrix(NetworkBulletinBoard _bbs) | |
23 { | |
24 bbs = _bbs; | |
25 } | |
26 | |
27 | |
28 | |
29 public void doPost(HttpServletRequest _req,HttpServletResponse _res) | |
30 { | |
31 String boardName = _req.getParameter(PARAM_BOARD_NAME); | |
32 String author = _req.getParameter(PARAM_BOARD_AUTHOR); | |
33 String msg = _req.getParameter(PARAM_BOARD_MESSAGE); | |
34 String key = _req.getParameter(PARAM_BOARD_EDITKEY); | |
35 String uuid = _req.getParameter(PARAM_BOARD_MSGID); | |
36 try{ | |
37 bbs.createAttribute(boardName, uuid, author, msg, key); | |
38 PrintWriter pw = _res.getWriter(); | |
39 pw.write("successfully written"); | |
40 pw.flush(); | |
41 }catch(Exception _e){ | |
42 _res.setStatus(500); | |
43 } | |
44 } | |
45 } |