!747
class MyHTTPD extends NanoHTTPD {
public MyHTTPD(int port) throws IOException { super(port); }
public Response serve(String uri, Method method,
Map header, Map parms, Map files) {
System.out.println( method + " '222" + uri + "' " );
String msg = "Hello server
\n";
if (parms.get("username") == null)
msg +=
"\n";
else
msg += "
Hello, " + parms.get("username") + "!
"; msg += "\n"; return newFixedLengthResponse(msg); } } m { static int port = 8888; static MyHTTPD server; p { server = new MyHTTPD(port); server.start(); } } !include #1000433 // class NanoHTTPD