Skip to content

Commit 1e203f8

Browse files
committed
Upgrade Jetty version to get rid of security related findings
1 parent 00d48d0 commit 1e203f8

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

pogen4selenium-example/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@
5050
<dependency>
5151
<groupId>org.eclipse.jetty</groupId>
5252
<artifactId>jetty-server</artifactId>
53-
<version>9.4.3.v20170317</version>
53+
<version>${jetty.version}</version>
5454
<scope>test</scope>
5555
</dependency>
5656

5757
<dependency>
58-
<groupId>org.eclipse.jetty</groupId>
59-
<artifactId>jetty-servlet</artifactId>
60-
<version>9.4.3.v20170317</version>
61-
<scope>test</scope>
58+
<groupId>org.eclipse.jetty.ee10</groupId>
59+
<artifactId>jetty-ee10-servlet</artifactId>
60+
<version>${jetty.version}</version>
61+
<scope>test</scope>
6262
</dependency>
6363

6464
</dependencies>

pogen4selenium-example/src/test/java/io/toolisticon/pogen4selenium/example/JettyServer.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
import java.io.IOException;
44

5-
import javax.servlet.ServletException;
6-
import javax.servlet.http.HttpServlet;
7-
import javax.servlet.http.HttpServletRequest;
8-
import javax.servlet.http.HttpServletResponse;
5+
import jakarta.servlet.ServletException;
6+
import jakarta.servlet.http.HttpServlet;
7+
import jakarta.servlet.http.HttpServletRequest;
8+
import jakarta.servlet.http.HttpServletResponse;
99

1010
import org.eclipse.jetty.server.Connector;
1111
import org.eclipse.jetty.server.Server;
1212
import org.eclipse.jetty.server.ServerConnector;
13-
import org.eclipse.jetty.servlet.ServletHandler;
13+
import org.eclipse.jetty.ee10.servlet.ServletContextHandler;
14+
import org.eclipse.jetty.ee10.servlet.ServletHandler;
1415

1516
public class JettyServer {
1617

@@ -22,8 +23,12 @@ public void start() throws Exception {
2223
connector.setPort(9090);
2324
server.setConnectors(new Connector[] {connector});
2425

26+
ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
27+
context.setContextPath("/");
28+
server.setHandler(context);
29+
2530
ServletHandler servletHandler = new ServletHandler();
26-
server.setHandler(servletHandler);
31+
context.setHandler(servletHandler);
2732

2833
servletHandler.addServletWithMapping(TestPage.class, "/start");
2934
servletHandler.addServletWithMapping(LinkedPageA.class, "/linkA");

pogen4selenium-processor/dependency-reduced-pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>pogen4selenium</artifactId>
55
<groupId>io.toolisticon.pogen4selenium</groupId>
6-
<version>0.8.1-SNAPSHOT</version>
6+
<version>0.8.2-SNAPSHOT</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99
<artifactId>pogen4selenium-processor</artifactId>

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
<junit.version>4.13.2</junit.version>
5959
<hamcrest.version>2.2</hamcrest.version>
6060
<mockito.version>2.28.2</mockito.version>
61+
<jetty.version>12.0.16</jetty.version>
6162

6263
<!-- plugin versions -->
6364
<animal-sniffer-maven-plugin.version>1.18</animal-sniffer-maven-plugin.version>

0 commit comments

Comments
 (0)