in functions/CDDLatencyDashboard/src/main/java/com/amazonaws/greengrass/cddlatencydashboard/vaadin/EmbeddedVaadinServer.java [73:100]
private void innerStart() {
synchronized (EmbeddedVaadinServer.class) {
try {
tryToSetProductionMode();
WebAppContext context = new WebAppContext();
context.setBaseResource(findWebRoot());
context.setContextPath("/");
context.addServlet(VaadinServlet.class, "/*");
context.getServletContext().setExtendedListenerTypes(true);
// Required or no routes are registered
context.setAttribute("org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern", ".*");
context.addEventListener(new ServletContextListeners());
Server server = new Server(8001);
server.setHandler(context);
ApplicationRouteRegistry applicationRouteRegistry = ApplicationRouteRegistry.getInstance(context.getServletContext());
vaadinComponents.forEach(componentClass -> autoWire(applicationRouteRegistry, componentClass));
server.start();
server.join();
} catch (Exception e) {
log.error(e.getMessage());
}
}
}