Mercurial > hg > Members > nobuyasu > jungle-network
comparison src/main/java/app/bbs/codesegment/StartBBSCodeSegment.java @ 118:f64ff5bd66f5
Implements persistent for bbs app and Fixed bug JungleUpdater
author | one |
---|---|
date | Wed, 25 Dec 2013 20:02:26 +0900 |
parents | 8f9811a1e00c |
children | cef245f71053 |
comparison
equal
deleted
inserted
replaced
117:24fdf5126f4d | 118:f64ff5bd66f5 |
---|---|
1 package app.bbs.codesegment; | 1 package app.bbs.codesegment; |
2 | 2 |
3 import java.io.FileNotFoundException; | |
4 import java.io.IOException; | |
3 import java.util.regex.Pattern; | 5 import java.util.regex.Pattern; |
4 import java.util.regex.Matcher; | 6 import java.util.regex.Matcher; |
5 | 7 |
6 import javax.servlet.Servlet; | 8 import javax.servlet.Servlet; |
7 | 9 |
10 import org.mortbay.jetty.servlet.ServletHolder; | 12 import org.mortbay.jetty.servlet.ServletHolder; |
11 | 13 |
12 import alice.codesegment.CodeSegment; | 14 import alice.codesegment.CodeSegment; |
13 import alice.datasegment.CommandType; | 15 import alice.datasegment.CommandType; |
14 import alice.datasegment.Receiver; | 16 import alice.datasegment.Receiver; |
15 import app.bbs.BulletinBoard; | |
16 import app.bbs.CreateBoardMessageServlet; | 17 import app.bbs.CreateBoardMessageServlet; |
17 import app.bbs.CreateBoardServlet; | 18 import app.bbs.CreateBoardServlet; |
18 import app.bbs.EditMessageServlet; | 19 import app.bbs.EditMessageServlet; |
19 import app.bbs.NetworkJungleBulletinBoard; | 20 import app.bbs.NetworkJungleBulletinBoard; |
20 import app.bbs.ShowBoardMessageServlet; | 21 import app.bbs.ShowBoardMessageServlet; |
42 System.out.println("name : "+ name); | 43 System.out.println("name : "+ name); |
43 Matcher matcher = pattern.matcher(name); | 44 Matcher matcher = pattern.matcher(name); |
44 matcher.find(); | 45 matcher.find(); |
45 // String type = matcher.group(1); | 46 // String type = matcher.group(1); |
46 | 47 |
48 NetworkJungleBulletinBoard cassaBBS = null; | |
49 try { | |
50 cassaBBS = new NetworkJungleBulletinBoard(name); | |
51 cassaBBS.init(); | |
52 } catch (FileNotFoundException e1) { | |
53 e1.printStackTrace(); | |
54 System.exit(0);; | |
55 } catch (IOException e) { | |
56 e.printStackTrace(); | |
57 } | |
58 | |
47 /* Jetty registration */ | 59 /* Jetty registration */ |
48 BulletinBoard cassaBBS = new NetworkJungleBulletinBoard(name); | |
49 String createBoardMessagePath = "/createBoardMessage"; | 60 String createBoardMessagePath = "/createBoardMessage"; |
50 String createBoardPath = "/createBoard"; | 61 String createBoardPath = "/createBoard"; |
51 String editMessagePath = "/editMessage"; | 62 String editMessagePath = "/editMessage"; |
52 String showBoardMessagePath = "/showBoardMessage"; | 63 String showBoardMessagePath = "/showBoardMessage"; |
53 | 64 |