SelectChannelConnector connector = new SelectChannelConnector();
connector.setPort(Integer.parseInt(PORT));
server.setConnectors(new Connector[] {connector});
WebAppContext webappcontext = new WebAppContext();
String contextPath = null;
try {
contextPath = getClass().getResource("/jaxrs_spring_providers").toURI().getPath();
} catch (URISyntaxException e1) {
e1.printStackTrace();
}
webappcontext.setContextPath("/webapp");
webappcontext.setWar(contextPath);
HandlerCollection handlers = new HandlerCollection();
handlers.setHandlers(new Handler[] {webappcontext, new DefaultHandler()});
server.setHandler(handlers);