用Jetty Web Server运行你的应用程序
?
A.http://www.codeproject.com/KB/java/Embedding_Jetty.aspx
?
B.public static void main(String[] args) {Server server = new Server();SocketConnector connector = new SocketConnector();connector.setMaxIdleTime(1000 * 60 * 60);connector.setSoLingerTime(-1);connector.setPort(8888);server.setConnectors(new Connector[] { connector });WebAppContext appContext = new WebAppContext();appContext.setParentLoaderPriority(true);appContext.setServer(server);appContext.setContextPath("/app");appContext.setWar("src/main/webapp");server.addHandler(appContext);try {server.start();} catch (Throwable e) {throw new RuntimeException(e);}}