From 3468e3cf80fc71e1ac1d341dc52da6039e755db9 Mon Sep 17 00:00:00 2001 From: Simon Bernard Date: Mon, 4 Nov 2024 16:16:19 +0100 Subject: [PATCH] Move from Jetty based on jakarta 9 to jakarta 10 --- .../leshan/demo/bsserver/LeshanBootstrapServerDemo.java | 8 ++++---- .../leshan/demo/bsserver/servlet/EventServlet.java | 4 ++-- .../org/eclipse/leshan/demo/server/LeshanServerDemo.java | 8 ++++---- .../eclipse/leshan/demo/server/servlet/EventServlet.java | 4 ++-- leshan-demo-servers-shared/pom.xml | 8 ++++---- pom.xml | 8 ++++---- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/leshan-demo-bsserver/src/main/java/org/eclipse/leshan/demo/bsserver/LeshanBootstrapServerDemo.java b/leshan-demo-bsserver/src/main/java/org/eclipse/leshan/demo/bsserver/LeshanBootstrapServerDemo.java index 58daceec78..7d7dc6c63a 100755 --- a/leshan-demo-bsserver/src/main/java/org/eclipse/leshan/demo/bsserver/LeshanBootstrapServerDemo.java +++ b/leshan-demo-bsserver/src/main/java/org/eclipse/leshan/demo/bsserver/LeshanBootstrapServerDemo.java @@ -27,9 +27,9 @@ import org.eclipse.californium.core.config.CoapConfig; import org.eclipse.californium.elements.config.Configuration; import org.eclipse.californium.scandium.config.DtlsConfig; -import org.eclipse.jetty.ee9.servlet.DefaultServlet; -import org.eclipse.jetty.ee9.servlet.ServletContextHandler; -import org.eclipse.jetty.ee9.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.DefaultServlet; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jetty.server.Server; import org.eclipse.leshan.bsserver.EditableBootstrapConfigStore; import org.eclipse.leshan.bsserver.LeshanBootstrapServer; @@ -217,7 +217,7 @@ private static Server createJettyServer(LeshanBsServerDemoCLI cli, LeshanBootstr jettyAddr = new InetSocketAddress(cli.main.webhost, cli.main.webPort); } Server server = new Server(jettyAddr); - ServletContextHandler root = new ServletContextHandler(null, "/", true, false); + ServletContextHandler root = new ServletContextHandler("/", true, false); server.setHandler(root); // Create static Servlet diff --git a/leshan-demo-bsserver/src/main/java/org/eclipse/leshan/demo/bsserver/servlet/EventServlet.java b/leshan-demo-bsserver/src/main/java/org/eclipse/leshan/demo/bsserver/servlet/EventServlet.java index 2d56b6f9fe..9d612593e4 100644 --- a/leshan-demo-bsserver/src/main/java/org/eclipse/leshan/demo/bsserver/servlet/EventServlet.java +++ b/leshan-demo-bsserver/src/main/java/org/eclipse/leshan/demo/bsserver/servlet/EventServlet.java @@ -21,8 +21,8 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import org.eclipse.jetty.ee9.servlets.EventSource; -import org.eclipse.jetty.ee9.servlets.EventSourceServlet; +import org.eclipse.jetty.ee10.servlets.EventSource; +import org.eclipse.jetty.ee10.servlets.EventSourceServlet; import org.eclipse.leshan.bsserver.BootstrapFailureCause; import org.eclipse.leshan.bsserver.BootstrapSession; import org.eclipse.leshan.bsserver.BootstrapSessionListener; diff --git a/leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/LeshanServerDemo.java b/leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/LeshanServerDemo.java index b2deef1177..c2578eb080 100644 --- a/leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/LeshanServerDemo.java +++ b/leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/LeshanServerDemo.java @@ -33,9 +33,9 @@ import org.eclipse.californium.elements.util.CertPathUtil; import org.eclipse.californium.scandium.config.DtlsConfig; import org.eclipse.californium.scandium.config.DtlsConfig.DtlsRole; -import org.eclipse.jetty.ee9.servlet.DefaultServlet; -import org.eclipse.jetty.ee9.servlet.ServletContextHandler; -import org.eclipse.jetty.ee9.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.DefaultServlet; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jetty.server.Server; import org.eclipse.leshan.core.endpoint.DefaultEndPointUriHandler; import org.eclipse.leshan.core.endpoint.EndPointUriHandler; @@ -290,7 +290,7 @@ private static Server createJettyServer(LeshanServerDemoCLI cli, LeshanServer lw jettyAddr = new InetSocketAddress(cli.main.webhost, cli.main.webPort); } Server server = new Server(jettyAddr); - ServletContextHandler root = new ServletContextHandler(null, "/", true, false); + ServletContextHandler root = new ServletContextHandler("/", true, false); server.setHandler(root); // Create static Servlet diff --git a/leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/servlet/EventServlet.java b/leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/servlet/EventServlet.java index 7932245e46..c542630b00 100644 --- a/leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/servlet/EventServlet.java +++ b/leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/servlet/EventServlet.java @@ -25,8 +25,8 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import org.eclipse.jetty.ee9.servlets.EventSource; -import org.eclipse.jetty.ee9.servlets.EventSourceServlet; +import org.eclipse.jetty.ee10.servlets.EventSource; +import org.eclipse.jetty.ee10.servlets.EventSourceServlet; import org.eclipse.leshan.core.LwM2m.Version; import org.eclipse.leshan.core.link.Link; import org.eclipse.leshan.core.node.LwM2mNode; diff --git a/leshan-demo-servers-shared/pom.xml b/leshan-demo-servers-shared/pom.xml index 6d740ad4e3..461b7b58fe 100644 --- a/leshan-demo-servers-shared/pom.xml +++ b/leshan-demo-servers-shared/pom.xml @@ -39,12 +39,12 @@ Contributors: leshan-demo-shared - org.eclipse.jetty.ee9 - jetty-ee9-webapp + org.eclipse.jetty.ee10 + jetty-ee10-webapp - org.eclipse.jetty.ee9 - jetty-ee9-servlets + org.eclipse.jetty.ee10 + jetty-ee10-servlets commons-lang diff --git a/pom.xml b/pom.xml index 43a6345728..49879b97ab 100644 --- a/pom.xml +++ b/pom.xml @@ -361,13 +361,13 @@ Contributors: ${picocli.version} - org.eclipse.jetty.ee9 - jetty-ee9-webapp + org.eclipse.jetty.ee10 + jetty-ee10-webapp ${jetty.version} - org.eclipse.jetty.ee9 - jetty-ee9-servlets + org.eclipse.jetty.ee10 + jetty-ee10-servlets ${jetty.version}