Merge pull request #10205 from eclipse/jetty-12.0.x-websocket-demos

fixes for jetty 12 ee8 websocket demos
This commit is contained in:
Lachlan 2023-08-07 13:12:10 +10:00 committed by GitHub
commit af7127c085
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 12 additions and 12 deletions

View File

@ -141,7 +141,7 @@
<servlet-mapping>
<servlet-name>WSChat</servlet-name>
<url-pattern>/ws/*</url-pattern>
<url-pattern>/jetty.websocket/*</url-pattern>
</servlet-mapping>

View File

@ -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>

View File

@ -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
{

View File

@ -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();

View File

@ -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<>();

View File

@ -141,7 +141,7 @@
<servlet-mapping>
<servlet-name>WSChat</servlet-name>
<url-pattern>/ws/*</url-pattern>
<url-pattern>/jetty.websocket/*</url-pattern>
</servlet-mapping>

View File

@ -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>

View File

@ -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))
{

View File

@ -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
{

View File

@ -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();

View File

@ -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();