Merge pull request #10205 from eclipse/jetty-12.0.x-websocket-demos
fixes for jetty 12 ee8 websocket demos
This commit is contained in:
commit
af7127c085
|
@ -141,7 +141,7 @@
|
|||
|
||||
<servlet-mapping>
|
||||
<servlet-name>WSChat</servlet-name>
|
||||
<url-pattern>/ws/*</url-pattern>
|
||||
<url-pattern>/jetty.websocket/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<li>Comet Chat Examples:
|
||||
<ul>
|
||||
<li><a href="chat/">Long Polling</a></li>
|
||||
<li><a href="ws">WebSocket (Jetty API)</a></li>
|
||||
<li><a href="jetty.websocket">WebSocket (Jetty API)</a></li>
|
||||
<li><a href="jakarta.websocket">WebSocket (jakarta.websocket)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -86,7 +86,7 @@ public class TestJettyOSGiBootWithWebSocket
|
|||
String port = System.getProperty("boot.websocket.port");
|
||||
assertNotNull(port);
|
||||
|
||||
URI uri = new URI("ws://127.0.0.1:" + port + "/ee10-demo-jetty/ws/foo");
|
||||
URI uri = new URI("ws://127.0.0.1:" + port + "/ee10-demo-jetty/jetty.websocket/foo");
|
||||
WebSocketClient client = new WebSocketClient();
|
||||
try
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ public class JettyWebSocketTest
|
|||
@Test
|
||||
public void testChatEndpoint() throws Exception
|
||||
{
|
||||
URI uri = WSURI.toWebsocket(server.getServerURI().resolve("/ee10-demo-jetty/ws/foo"));
|
||||
URI uri = WSURI.toWebsocket(server.getServerURI().resolve("/ee10-demo-jetty/jetty.websocket/foo"));
|
||||
|
||||
WebSocketClient client = new WebSocketClient();
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import jakarta.websocket.RemoteEndpoint;
|
|||
import jakarta.websocket.Session;
|
||||
import jakarta.websocket.server.ServerEndpoint;
|
||||
|
||||
@ServerEndpoint(value = "/jakarta.websocket/", subprotocols = {"chat"})
|
||||
@ServerEndpoint(value = "/javax.websocket/", subprotocols = {"chat"})
|
||||
public class JakartaWebSocketChat
|
||||
{
|
||||
private static final List<JakartaWebSocketChat> members = new CopyOnWriteArrayList<>();
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
|
||||
<servlet-mapping>
|
||||
<servlet-name>WSChat</servlet-name>
|
||||
<url-pattern>/ws/*</url-pattern>
|
||||
<url-pattern>/jetty.websocket/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
<li>Comet Chat Examples:
|
||||
<ul>
|
||||
<li><a href="chat/">Long Polling</a></li>
|
||||
<li><a href="ws">WebSocket (Jetty API)</a></li>
|
||||
<li><a href="jakarta.websocket">WebSocket (jakarta.websocket)</a></li>
|
||||
<li><a href="jetty.websocket">WebSocket (Jetty API)</a></li>
|
||||
<li><a href="javax.websocket">WebSocket (jakarta.websocket)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -108,7 +108,7 @@ public class TestJettyOSGiBootWithJakartaWebSocket
|
|||
Logger log = Logger.getLogger(this.getClass().getName());
|
||||
|
||||
SimpleJakartaWebSocket socket = new SimpleJakartaWebSocket();
|
||||
URI uri = new URI("ws://127.0.0.1:" + port + "/ee9-demo-jetty/jakarta.websocket/");
|
||||
URI uri = new URI("ws://127.0.0.1:" + port + "/ee9-demo-jetty/javax.websocket/");
|
||||
log.info("Attempting to connect to " + uri);
|
||||
try (Session session = container.connectToServer(socket, uri))
|
||||
{
|
||||
|
|
|
@ -82,7 +82,7 @@ public class TestJettyOSGiBootWithWebSocket
|
|||
String port = System.getProperty("boot.websocket.port");
|
||||
assertNotNull(port);
|
||||
|
||||
URI uri = new URI("ws://127.0.0.1:" + port + "/ee9-demo-jetty/ws/foo");
|
||||
URI uri = new URI("ws://127.0.0.1:" + port + "/ee9-demo-jetty/jetty.websocket/foo");
|
||||
WebSocketClient client = new WebSocketClient();
|
||||
try
|
||||
{
|
||||
|
|
|
@ -58,7 +58,7 @@ public class JakartaWebSocketTest
|
|||
@Test
|
||||
public void testChatEndpoint() throws Exception
|
||||
{
|
||||
URI uri = WSURI.toWebsocket(server.getServerURI().resolve("/ee9-demo-jetty/jakarta.websocket"));
|
||||
URI uri = WSURI.toWebsocket(server.getServerURI().resolve("/ee9-demo-jetty/javax.websocket"));
|
||||
|
||||
WebSocketContainer container = ContainerProvider.getWebSocketContainer();
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ public class JettyWebSocketTest
|
|||
@Test
|
||||
public void testChatEndpoint() throws Exception
|
||||
{
|
||||
URI uri = WSURI.toWebsocket(server.getServerURI().resolve("/ee9-demo-jetty/ws/foo"));
|
||||
URI uri = WSURI.toWebsocket(server.getServerURI().resolve("/ee9-demo-jetty/jetty.websocket/foo"));
|
||||
|
||||
WebSocketClient client = new WebSocketClient();
|
||||
|
||||
|
|
Loading…
Reference in New Issue