Mercurial > hg > Members > tatsuki > bbs
comparison src/main/java/jp/ac/u_ryukyu/ie/cr/bbs/browsing/ShowBoardsServlet.java @ 7:6c584862fe93
edit build.gradle
author | tatsuki |
---|---|
date | Sat, 19 Nov 2016 22:31:25 +0900 |
parents | 2b3542c5be34 |
children |
comparison
equal
deleted
inserted
replaced
6:36f0f18ce6a8 | 7:6c584862fe93 |
---|---|
12 */ | 12 */ |
13 private static final long serialVersionUID = 1L; | 13 private static final long serialVersionUID = 1L; |
14 private final BrowsingBulletinBoard bbs; | 14 private final BrowsingBulletinBoard bbs; |
15 private final String createBoardPath; | 15 private final String createBoardPath; |
16 private final String showBoardMessagePath; | 16 private final String showBoardMessagePath; |
17 private final String layoutImportPath; | |
18 private final String findNodePath; | 17 private final String findNodePath; |
19 public ShowBoardsServlet(BrowsingBulletinBoard _bbs, String _createBoardPath,String _showBoardMessagePath,String _layoutImportPath, String _findNodePath) | 18 public ShowBoardsServlet(BrowsingBulletinBoard _bbs, String _createBoardPath,String _showBoardMessagePath, String _findNodePath) |
20 { | 19 { |
21 bbs = _bbs; | 20 bbs = _bbs; |
22 findNodePath = _findNodePath; | 21 findNodePath = _findNodePath; |
23 createBoardPath = _createBoardPath; | 22 createBoardPath = _createBoardPath; |
24 showBoardMessagePath = _showBoardMessagePath; | 23 showBoardMessagePath = _showBoardMessagePath; |
25 layoutImportPath = _layoutImportPath; | |
26 } | 24 } |
27 | 25 |
28 public void doGet(HttpServletRequest _req,HttpServletResponse _res) | 26 public void doGet(HttpServletRequest _req,HttpServletResponse _res) |
29 { | 27 { |
30 try{ | 28 try{ |
43 _pw.write("<form action='"+createBoardPath+"' method='POST'\n"); | 41 _pw.write("<form action='"+createBoardPath+"' method='POST'\n"); |
44 _pw.write("<p>Create new board.</p>"); | 42 _pw.write("<p>Create new board.</p>"); |
45 _pw.write("<p>BoardName : <input type='text' name='bname'/></p>\n"); | 43 _pw.write("<p>BoardName : <input type='text' name='bname'/></p>\n"); |
46 _pw.write("<p><input type='submit' value='submit'/></form></p><hr/>\n"); | 44 _pw.write("<p><input type='submit' value='submit'/></form></p><hr/>\n"); |
47 | 45 |
48 _pw.write("<form action='"+layoutImportPath+"' method='POST'\n"); | |
49 _pw.write("<p>import layoutFile</p>"); | |
50 _pw.write("<p>BoardName : <input type='text' name='bname'/></p>\n"); | |
51 _pw.write("<p>layout path : <input type='text' name='path'/></p>\n"); | |
52 _pw.write("<p><input type='submit' value='submit'/></form></p><hr/>\n"); | |
53 | |
54 _pw.write("<h2>list of boards</h2>"); | 46 _pw.write("<h2>list of boards</h2>"); |
55 for(String board : bbs.getBoards()){ | 47 for(String board : bbs.getBoards()){ |
56 _pw.write("<p><a href='"+showBoardMessagePath+"?bname=" + bbs.sanitize(board) + "&path=-1" +"'>"+ bbs.sanitize(board) + "</a> " + | 48 _pw.write("<p><a href='"+showBoardMessagePath+"?bname=" + bbs.sanitize(board) + "&path=-1" +"'>"+ bbs.sanitize(board) + "</a> " + |
57 "<a href='"+findNodePath+"?bname=" + bbs.sanitize(board) +"'>"+ "find</a>" | 49 "<a href='"+findNodePath+"?bname=" + bbs.sanitize(board) +"'>"+ "find</a>" |
58 + "</p>"); | 50 + "</p>"); |