package com.dymc.webservice;
import java.net.UnknownHostException;
import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.nio.SelectChannelConnector;
import org.mortbay.jetty.webapp.WebAppContext;
public class JettyStarter {
/**
* @param args
* @throws UnknownHostException
*/
public static void main(String[] args) throws Exception {
Server server = new Server();
SelectChannelConnector conn = new SelectChannelConnector();
conn.setPort(8000);
conn.setHost("192.168.1.19");
server.setConnectors(new Connector[]{conn});
WebAppContext context = new WebAppContext();
context.setContextPath("/");
context.setResourceBase("./web");
context.setClassLoader(Thread.currentThread().getContextClassLoader());
server.setHandler(context);
server.start();
server.join();
}
}
import java.net.UnknownHostException;
import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.nio.SelectChannelConnector;
import org.mortbay.jetty.webapp.WebAppContext;
public class JettyStarter {
/**
* @param args
* @throws UnknownHostException
*/
public static void main(String[] args) throws Exception {
Server server = new Server();
SelectChannelConnector conn = new SelectChannelConnector();
conn.setPort(8000);
conn.setHost("192.168.1.19");
server.setConnectors(new Connector[]{conn});
WebAppContext context = new WebAppContext();
context.setContextPath("/");
context.setResourceBase("./web");
context.setClassLoader(Thread.currentThread().getContextClassLoader());
server.setHandler(context);
server.start();
server.join();
}
}