fix build problems from bad merge

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2019-06-20 09:40:11 +10:00
parent 22b054e0ef
commit 6f94b72667
2 changed files with 24 additions and 9 deletions

View File

@ -53,22 +53,19 @@ public class WebSocketJsrServer
HandlerList handlers = new HandlerList();
ServletContextHandler context = new ServletContextHandler(
ServletContextHandler contextHandler = new ServletContextHandler(
ServletContextHandler.SESSIONS);
context.setContextPath("/");
handlers.addHandler(context);
contextHandler.setContextPath("/");
handlers.addHandler(contextHandler);
handlers.addHandler(new DefaultHandler());
server.setHandler(handlers);
// Enable javax.websocket configuration for the context
ServerContainer wsContainer = JavaxWebSocketServletContainerInitializer
.configureContext(context);
// Add your websockets to the container
wsContainer.addEndpoint(EchoJsrSocket.class);
JavaxWebSocketServletContainerInitializer.configure(contextHandler, (context, container)->
container.addEndpoint(EchoJsrSocket.class));
server.start();
context.dumpStdErr();
contextHandler.dumpStdErr();
server.join();
}
}

View File

@ -1,3 +1,21 @@
//
// ========================================================================
// Copyright (c) 1995-2019 Mort Bay Consulting Pty. Ltd.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//
package org.eclipse.jetty.websocket.tests.util;
import java.util.concurrent.Future;