Replaced webserver with Jetty.

This commit is contained in:
FrozenCow 2011-12-27 17:46:05 +01:00
parent db3ab5a437
commit 3c4a88a874
19 changed files with 1081 additions and 1020 deletions

View file

@ -0,0 +1,18 @@
package org.dynmap.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.http.HttpServletResponse;
import org.json.simple.JSONAware;
import org.json.simple.JSONStreamAware;
public class JSONServlet {
public static void respond(HttpServletResponse response, JSONStreamAware json) throws IOException {
response.setContentType("application/json");
PrintWriter writer = response.getWriter();
json.writeJSONString(writer);
writer.close();
}
}