Skip to content

Commit

Permalink
Remove WARNING about usage of deprecated API
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernard31 committed Nov 5, 2024
1 parent 3468e3c commit 17a7f20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,11 @@ private static Server createJettyServer(LeshanBsServerDemoCLI cli, LeshanBootstr
// Create static Servlet
DefaultServlet staticServelt = new DefaultServlet();
ServletHolder staticHolder = new ServletHolder(staticServelt);
staticHolder.setInitParameter("resourceBase",
staticHolder.setInitParameter("baseResource",
LeshanBootstrapServerDemo.class.getClassLoader().getResource("webapp").toExternalForm());
staticHolder.setInitParameter("pathInfoOnly", "true");
staticHolder.setInitParameter("gzip", "true");
staticHolder.setInitParameter("cacheControl", "public, max-age=31536000");
root.addServlet(staticHolder, "/*");
root.addServlet(staticHolder, "/");

// Create REST API Servlets
ServletHolder bsServletHolder = new ServletHolder(new BootstrapServlet(bsStore));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,11 @@ private static Server createJettyServer(LeshanServerDemoCLI cli, LeshanServer lw
// Create static Servlet
DefaultServlet staticServelt = new DefaultServlet();
ServletHolder staticHolder = new ServletHolder(staticServelt);
staticHolder.setInitParameter("resourceBase",
staticHolder.setInitParameter("baseResource",
LeshanServerDemo.class.getClassLoader().getResource("webapp").toExternalForm());
staticHolder.setInitParameter("pathInfoOnly", "true");
staticHolder.setInitParameter("gzip", "true");
staticHolder.setInitParameter("cacheControl", "public, max-age=31536000");
root.addServlet(staticHolder, "/*");
root.addServlet(staticHolder, "/");

// Create REST API Servlets
EventServlet eventServlet = new EventServlet(lwServer);
Expand Down

0 comments on commit 17a7f20

Please sign in to comment.