start.java

来自「利用google开发的GWT工具」· Java 代码 · 共 45 行

JAVA
45
字号
package org.gjj.gwt;import org.mortbay.jetty.Connector;import org.mortbay.jetty.Server;import org.mortbay.jetty.bio.SocketConnector;import org.mortbay.jetty.webapp.WebAppContext;import org.mortbay.thread.BoundedThreadPool;import java.io.*;public class Start {	/**	 * @param args	 */	public static void main(String[] args) {		Server jettyServer = null;		try {			jettyServer = new Server();			BoundedThreadPool tp = new BoundedThreadPool();			tp.setMaxThreads(50);			SocketConnector conn = new SocketConnector();			//int port = 8080;			int port = 9080;			conn.setPort(port);            conn.setThreadPool(tp);            conn.setAcceptQueueSize(100);            jettyServer.setConnectors(new Connector[] { conn });                        WebAppContext wac = new WebAppContext();            wac.setContextPath("/EDA-Front");            wac.setWar("www/org.gjj.gwt.EDAFront");            jettyServer.setHandler(wac);            wac.setTempDirectory(new File("/tmp/jetty"));            jettyServer.start();		} catch (Exception e) {			e.printStackTrace();			try {                jettyServer.stop();            } catch (Exception f) {            	f.printStackTrace();            }		}		return;	}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?