server = new Server(port);
// insecure: only use for tests!!!!
server.setSessionIdManager(new HashSessionIdManager(new Random(random.nextLong())));
new WebAppContext(server, path, context );
SocketConnector connector = new SocketConnector();
connector.setMaxIdleTime(1000 * 60 * 60);
connector.setSoLingerTime(-1);
connector.setPort(0);
server.setConnectors(new Connector[]{connector});
server.setStopAtShutdown( true );
server.start();
port = connector.getLocalPort();
}