server = createServer(url);
server = createServer(url, processor.getSsl()); } else {  SslParameters ssl = (SslParameters) sslParams.get(getKey(url)); if (ssl != null && !ssl.equals(processor.getSsl())) { throw new Exception("An https server is already created on port " + url.getPort() + " but SSL parameters do not match"); }
    public synchronized ContextHandler createContext(String strUrl, HttpProcessor processor) throws Exception {        URL url = new URL(strUrl);        Server server = getServer(url);        if (server == null) {            server = createServer(url);        }        String path = url.getPath();        if (!path.startsWith("/")) {            path = "/" + path;        }        if (path.endsWith("/")) {            path = path.substring(0, path.length() - 1);        }        // Check that context does not exist yet        Handler[] handlers = server.getHandlers();        if (handlers != null) {            for (int i = 0; i < handlers.length; i++) {                if (handlers[i] instanceof ContextHandler) {                    ContextHandler h = (ContextHandler) handlers[i];                    if (h.getContextPath().startsWith(path) ||                        path.startsWith(h.getContextPath())) {                        throw new Exception("The requested context for path '" + path + "' overlaps with an existing context for path: '" + h.getContextPath() + "'");                    }                }            }        }        // Create context        ContextHandler context = new ContextHandler();        context.setContextPath(path);        ServletHolder holder = new ServletHolder();        holder.setName("jbiServlet");        holder.setClassName(HttpBridgeServlet.class.getName());        ServletHandler handler = new ServletHandler();        handler.setServlets(new ServletHolder[] { holder });        ServletMapping mapping = new ServletMapping();        mapping.setServletName("jbiServlet");        mapping.setPathSpec("/*");        handler.setServletMappings(new ServletMapping[] { mapping });        context.setHandler(handler);        context.setAttribute("processor", processor);        // add context        handlers = (Handler[]) add(handlers, context, Handler.class);        server.setHandlers(handlers);        return context;    }