.setDefaultHandler(
//we use a predicate handler here. If the path is index.html we serve the page
//otherwise we redirect to index.html
new PredicateHandler(
Predicates.path("/index.html"),
new ResourceHandler()
.setResourceManager(new ClassPathResourceManager(WebSocketServer.class.getClassLoader(), WebSocketServer.class.getPackage())),
new RedirectHandler("http://localhost:8080/index.html")))
.build();
server.start();
}