protected synchronized void setHttpService(HttpService s) { ahHttpAdapter = new HttpAhBinder(); this.setRootUrl(applicationWebAlias); Servlet customJsonServlet = new CustomJsonServlet(ahHttpAdapter, ""); Servlet jsonRPC = new JsonRPC(ahHttpAdapter, ""); this.registerResource("/", "webapp/ehdemo"); this.registerResource("/gh", "webapp/gh"); this.registerResource("/post-json", customJsonServlet); this.registerResource("/json-rpc", jsonRPC); this.registerResource( "/JSON-RPC", new JSONRPCServlet() { public void init(ServletConfig config) throws ServletException { super.init(new ServletConfigDisableGZIPWrapper(config)); } }); this.setHttpContext(this); this.update(null); super.bindHttpService(s); }