01: /*
02: * This file is part of the QuickServer library
03: * Copyright (C) 2003-2005 QuickServer.org
04: *
05: * Use, modification, copying and distribution of this software is subject to
06: * the terms and conditions of the GNU Lesser General Public License.
07: * You should have received a copy of the GNU LGP License along with this
08: * library; if not, you can download a copy from <http://www.quickserver.org/>.
09: *
10: * For questions, suggestions, bug-reports, enhancement-requests etc.
11: * visit http://www.quickserver.org
12: *
13: */
14:
15: package echowebserver;
16:
17: import java.io.*;
18: import java.util.StringTokenizer;
19: import org.quickserver.net.*;
20: import org.quickserver.net.server.*;
21:
22: import java.util.logging.*;
23: import org.quickserver.util.logging.*;
24:
25: /**
26: * A simple HTTP server that generates a Web page
27: * showing all the data that it received from
28: * the Web client.
29: * @author Akshathkumar Shetty
30: */
31: public class EchoWebServer {
32: public static void main(String args[]) {
33: QuickServer myServer = new QuickServer();
34: String confFile = "conf" + File.separator + "EchoWebServer.xml";
35: Object config[] = new Object[] { confFile };
36: if (myServer.initService(config) == true) {
37: try {
38: myServer.startServer();
39: myServer.startQSAdminServer();
40: } catch (AppException e) {
41: System.err.println("Error in server : " + e);
42: e.printStackTrace();
43: }
44: }
45: }
46: }
|