threadPool.setDaemon(true);
server.setThreadPool(threadPool);
final ResourceHandler resHandler = new ResourceHandler();
resHandler.setResourceBase(resourceBase.getAbsolutePath());
final HandlerList handlerList = new HandlerList();
handlerList.setHandlers(new Handler[] {resHandler, new DefaultHandler()});
server.setHandler(handlerList);
try {
server.start();
} catch (Exception e) {
throw new RuntimeException(e);