code: private Server __buildServer() {
          Server mServer = new Server();
  
          // Connectors...
          Connector[] connectors = getConnectors(mServer);
          if (connectors == null || connectors.length == 0)
              throw new RuntimeException("Missing connectors");
  
          for (Connector connector : connectors) {
              mServer.addConnector(connector);
          }
  
          ServletContextHandler handler = new ServletContextHandler(ServletContextHandler.SESSIONS);
          handler.setContextPath("/");
          handler.setResourceBase(System.getProperty("java.io.tmpdir"));
  
          // Filters...
          for (Map.Entry<String, List<Class<? extends Filter>>> filterEntry : filterMap.entrySet()) {
              for (Class<? extends Filter> filterClass : filterEntry.getValue()) {
                  handler.addFilter(filterClass, filterEntry.getKey(), EnumSet.of(DispatcherType.REQUEST));
              }
          }
  
          // Servlets...
          for (Map.Entry<String, Class<? extends HttpServlet>> servletEntry : servletMap.entrySet()) {
              handler.addServlet(servletEntry.getValue(), servletEntry.getKey());
          }
  
          // Event listeners...
          for (Class<? extends EventListener> eventListenerClass : servletContextListenerSet) {
              try {
                  EventListener eventListener = eventListenerClass.newInstance();
                  handler.addEventListener(eventListener);
              } catch (IllegalAccessException | InstantiationException ex) {
                  throw new RuntimeException(ex);
              }
          }
  
          // Error handler...
          if (errorHandler != null)
              handler.setErrorHandler(errorHandler);
  
          mServer.setHandler(handler);
          return mServer;
      }
docs: -------------------------------------------------------------------------