protected void startJetty() throws Exception { // Bridge Jetty logging to Android logging // TODO: Make configurable AndroidLog.__isDebugEnabled = false; System.setProperty("org.mortbay.log.class", "org.mortbay.log.AndroidLog"); org.mortbay.log.Log.setLog(new AndroidLog()); // Set jetty.home System.setProperty("jetty.home", IJetty.__JETTY_DIR.getAbsolutePath()); server = newServer(); configureConnectors(); configureHandlers(); configureDeployers(); configureRealm(); server.start(); // TODO // Less than ideal solution to the problem that dalvik doesn't know about manifests of jars. // A as the version field is private to Server, its difficult // if not impossible to set it any other way. Note this means that // ContextHandler.SContext.getServerInfo() // will still return 0.0. HttpGenerator.setServerVersion("i-jetty " + pi.versionName); }
static { try { org.mortbay.log.Log.setLog(new org.mortbay.log.Slf4jLog()); } catch (Throwable t) { logger.error(t.getMessage(), t); } }