From 3131b0f42c9a9570c09e47459db30a51b48d5cc1 Mon Sep 17 00:00:00 2001 From: Eric Colinet Date: Tue, 10 Dec 2024 15:01:15 +0100 Subject: [PATCH] Allow the use of Tomcat 10 using the jakarta namespace --- pom.xml | 6 +++--- .../session/redis/SessionHandlerValve.java | 2 +- .../session/redis/SingleSignOnValve.java | 4 ++-- .../session/redis/SessionManagerTest.java | 20 +++++++++---------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index b93d552..d53b8e5 100644 --- a/pom.xml +++ b/pom.xml @@ -21,18 +21,18 @@ UTF-8 UTF-8 - 1.7 + 17 3.0.1 2.6.2 1.7.26 3.6.1 - 1.7 + 17 ${source-java.version} - 8.5.32 + 10.1.33 diff --git a/src/main/java/tomcat/request/session/redis/SessionHandlerValve.java b/src/main/java/tomcat/request/session/redis/SessionHandlerValve.java index 7d6a347..68c708c 100644 --- a/src/main/java/tomcat/request/session/redis/SessionHandlerValve.java +++ b/src/main/java/tomcat/request/session/redis/SessionHandlerValve.java @@ -7,7 +7,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import tomcat.request.session.exception.BackendException; -import javax.servlet.ServletException; +import jakarta.servlet.ServletException; import java.io.IOException; /** author: Ranjith Manickam @ 12 Jul' 2018 */ diff --git a/src/main/java/tomcat/request/session/redis/SingleSignOnValve.java b/src/main/java/tomcat/request/session/redis/SingleSignOnValve.java index cd4bae8..ba64cbb 100644 --- a/src/main/java/tomcat/request/session/redis/SingleSignOnValve.java +++ b/src/main/java/tomcat/request/session/redis/SingleSignOnValve.java @@ -17,8 +17,8 @@ import org.slf4j.LoggerFactory; import tomcat.request.session.exception.BackendException; import tomcat.request.session.model.SingleSignOnEntry; -import javax.servlet.ServletException; -import javax.servlet.http.Cookie; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.Cookie; import java.io.IOException; import java.security.Principal; import java.util.Set; diff --git a/src/test/java/tomcat/request/session/redis/SessionManagerTest.java b/src/test/java/tomcat/request/session/redis/SessionManagerTest.java index d5f2149..6933ab2 100644 --- a/src/test/java/tomcat/request/session/redis/SessionManagerTest.java +++ b/src/test/java/tomcat/request/session/redis/SessionManagerTest.java @@ -4,12 +4,12 @@ import java.io.IOException; import java.util.Date; import java.util.Enumeration; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; +import jakarta.servlet.ServletException; +import jakarta.servlet.annotation.WebServlet; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; @WebServlet("/") public class SessionManagerTest extends HttpServlet { @@ -44,7 +44,7 @@ public class SessionManagerTest extends HttpServlet { /** * method to send response - * + * * @param response * @param responseData * @throws IOException @@ -57,7 +57,7 @@ public class SessionManagerTest extends HttpServlet { /** * method to get actions - * + * * @param request * @return */ @@ -95,7 +95,7 @@ public class SessionManagerTest extends HttpServlet { /** * method to set session values - * + * * @param session * @return */ @@ -108,7 +108,7 @@ public class SessionManagerTest extends HttpServlet { /** * method to get session values - * + * * @param session * @param action * @return