System.out.println("Starting Web Server on port: " + port);
Server server = new Server();
SelectChannelConnector connector = new SelectChannelConnector();
connector.setPort(port);
connector.setServer(server);
WebAppContext context = new WebAppContext();
context.setResourceBase(WEBAPP_DIR);
context.setContextPath(WEBAPP_CTX);
context.setServer(server);
server.setHandler(context);
server.setConnectors(new Connector[] {
connector
});
server.start();