From e0198bd4862888c2383324949c8c531e3340016d Mon Sep 17 00:00:00 2001 From: Boubaker Khanfir Date: Mon, 28 Aug 2023 14:46:45 +0100 Subject: [PATCH] feat: Upgrade To Tomcat 10 - Meeds-io/MIPs#76 --- test/core/pom.xml | 4 +-- .../authentication/AuthenticationServlet.java | 13 +++++----- .../crosscontext/CrossContextServlet.java | 15 +++++------ .../AbstractDeploymentTestCase.java | 9 ++++--- .../wci/test/deployment/NativeSkipFilter.java | 5 ++-- .../AbstractRequestDispatchTestCase.java | 7 +++--- .../requestdispatch/ExceptionCallback.java | 11 ++++---- .../test/requestdispatch/NormalCallback.java | 11 ++++---- .../RequestDispatchServlet.java | 11 ++++---- .../test/servletlistener/ListenerServlet.java | 13 +++++----- .../ServletEventCountListener.java | 4 +-- test/servers/tomcat8/pom.xml | 15 +++++++---- .../wci/command/TomcatCommandDispatcher.java | 11 ++++---- .../wci/tomcat/TomcatContainerServlet.java | 7 +++--- .../tomcat/TomcatServletContainerContext.java | 25 ++++++++++--------- .../wci/tomcat/TomcatWebAppContext.java | 10 ++++---- wci/pom.xml | 4 +-- .../gatein/wci/RequestDispatchCallback.java | 9 ++++--- .../java/org/gatein/wci/ServletContainer.java | 17 +++++++------ .../gatein/wci/ServletContextDispatcher.java | 9 ++++--- wci/src/main/java/org/gatein/wci/WebApp.java | 10 ++++---- .../org/gatein/wci/api/GateInServlet.java | 2 +- .../authentication/AuthenticationEvent.java | 4 +-- .../gatein/wci/command/CommandDispatcher.java | 11 ++++---- .../gatein/wci/command/CommandServlet.java | 13 +++++----- .../org/gatein/wci/session/SessionTask.java | 2 +- .../wci/session/SessionTaskVisitor.java | 4 +-- .../gatein/wci/spi/CatalinaWebAppContext.java | 16 ++++++------ .../wci/spi/ServletContainerContext.java | 10 ++++---- .../gatein/wci/spi/SimpleWebAppContext.java | 11 ++++---- .../org/gatein/wci/spi/WebAppContext.java | 10 ++++---- 31 files changed, 163 insertions(+), 140 deletions(-) diff --git a/test/core/pom.xml b/test/core/pom.xml index e30e750bf..6ce7eaca8 100644 --- a/test/core/pom.xml +++ b/test/core/pom.xml @@ -40,8 +40,8 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. slf4j-api - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api junit diff --git a/test/core/src/test/java/org/gatein/wci/test/authentication/AuthenticationServlet.java b/test/core/src/test/java/org/gatein/wci/test/authentication/AuthenticationServlet.java index af89ed175..f67f13d9d 100644 --- a/test/core/src/test/java/org/gatein/wci/test/authentication/AuthenticationServlet.java +++ b/test/core/src/test/java/org/gatein/wci/test/authentication/AuthenticationServlet.java @@ -16,6 +16,9 @@ */ package org.gatein.wci.test.authentication; +import java.io.IOException; +import java.util.LinkedList; + import org.gatein.wci.ServletContainer; import org.gatein.wci.ServletContainerFactory; import org.gatein.wci.authentication.AuthenticationEvent; @@ -23,12 +26,10 @@ import org.gatein.wci.authentication.AuthenticationListener; import org.gatein.wci.security.Credentials; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.LinkedList; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** @author Julien Viet */ public class AuthenticationServlet extends HttpServlet diff --git a/test/core/src/test/java/org/gatein/wci/test/crosscontext/CrossContextServlet.java b/test/core/src/test/java/org/gatein/wci/test/crosscontext/CrossContextServlet.java index 1ef676f1f..20ca541c8 100644 --- a/test/core/src/test/java/org/gatein/wci/test/crosscontext/CrossContextServlet.java +++ b/test/core/src/test/java/org/gatein/wci/test/crosscontext/CrossContextServlet.java @@ -16,6 +16,8 @@ */ package org.gatein.wci.test.crosscontext; +import java.io.IOException; + import org.gatein.wci.RequestDispatchCallback; import org.gatein.wci.ServletContainer; import org.gatein.wci.ServletContainerFactory; @@ -23,13 +25,12 @@ import org.gatein.wci.security.Credentials; import org.gatein.wci.test.WebAppRegistry; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; -import java.io.IOException; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; /** @author Julien Viet */ public class CrossContextServlet extends HttpServlet diff --git a/test/core/src/test/java/org/gatein/wci/test/deployment/AbstractDeploymentTestCase.java b/test/core/src/test/java/org/gatein/wci/test/deployment/AbstractDeploymentTestCase.java index 79bf7927b..871c4ac8a 100644 --- a/test/core/src/test/java/org/gatein/wci/test/deployment/AbstractDeploymentTestCase.java +++ b/test/core/src/test/java/org/gatein/wci/test/deployment/AbstractDeploymentTestCase.java @@ -16,8 +16,9 @@ */ package org.gatein.wci.test.deployment; -import junit.framework.Assert; -import junit.framework.AssertionFailedError; +import java.util.HashSet; +import java.util.Set; + import org.gatein.wci.ServletContainer; import org.gatein.wci.ServletContainerFactory; import org.gatein.wci.WebApp; @@ -32,8 +33,8 @@ import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Test; -import java.util.HashSet; -import java.util.Set; +import junit.framework.Assert; +import junit.framework.AssertionFailedError; /** @author Julien Viet */ public abstract class AbstractDeploymentTestCase extends AbstractWCITestCase diff --git a/test/core/src/test/java/org/gatein/wci/test/deployment/NativeSkipFilter.java b/test/core/src/test/java/org/gatein/wci/test/deployment/NativeSkipFilter.java index dfc190fb0..9f455bb65 100644 --- a/test/core/src/test/java/org/gatein/wci/test/deployment/NativeSkipFilter.java +++ b/test/core/src/test/java/org/gatein/wci/test/deployment/NativeSkipFilter.java @@ -16,10 +16,11 @@ */ package org.gatein.wci.test.deployment; -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; import java.util.HashSet; +import jakarta.servlet.ServletContextEvent; +import jakarta.servlet.ServletContextListener; + /** @author Julien Viet */ public class NativeSkipFilter implements ServletContextListener { diff --git a/test/core/src/test/java/org/gatein/wci/test/requestdispatch/AbstractRequestDispatchTestCase.java b/test/core/src/test/java/org/gatein/wci/test/requestdispatch/AbstractRequestDispatchTestCase.java index 576c003c1..3105f7a64 100644 --- a/test/core/src/test/java/org/gatein/wci/test/requestdispatch/AbstractRequestDispatchTestCase.java +++ b/test/core/src/test/java/org/gatein/wci/test/requestdispatch/AbstractRequestDispatchTestCase.java @@ -16,7 +16,9 @@ */ package org.gatein.wci.test.requestdispatch; -import junit.framework.Assert; +import java.net.HttpURLConnection; +import java.net.URL; + import org.gatein.wci.test.AbstractWCITestCase; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.OperateOnDeployment; @@ -26,8 +28,7 @@ import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Test; -import java.net.HttpURLConnection; -import java.net.URL; +import junit.framework.Assert; /** @author Julien Viet */ public abstract class AbstractRequestDispatchTestCase extends AbstractWCITestCase diff --git a/test/core/src/test/java/org/gatein/wci/test/requestdispatch/ExceptionCallback.java b/test/core/src/test/java/org/gatein/wci/test/requestdispatch/ExceptionCallback.java index c1bf77574..bb3590ff5 100644 --- a/test/core/src/test/java/org/gatein/wci/test/requestdispatch/ExceptionCallback.java +++ b/test/core/src/test/java/org/gatein/wci/test/requestdispatch/ExceptionCallback.java @@ -16,13 +16,14 @@ */ package org.gatein.wci.test.requestdispatch; +import java.io.IOException; + import org.gatein.wci.ServletContextDispatcher; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * @author Julien Viet diff --git a/test/core/src/test/java/org/gatein/wci/test/requestdispatch/NormalCallback.java b/test/core/src/test/java/org/gatein/wci/test/requestdispatch/NormalCallback.java index 9f6daa4b7..22a9214ff 100644 --- a/test/core/src/test/java/org/gatein/wci/test/requestdispatch/NormalCallback.java +++ b/test/core/src/test/java/org/gatein/wci/test/requestdispatch/NormalCallback.java @@ -16,13 +16,14 @@ */ package org.gatein.wci.test.requestdispatch; +import java.io.IOException; + import org.gatein.wci.ServletContextDispatcher; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; public class NormalCallback extends AbstractCallback { diff --git a/test/core/src/test/java/org/gatein/wci/test/requestdispatch/RequestDispatchServlet.java b/test/core/src/test/java/org/gatein/wci/test/requestdispatch/RequestDispatchServlet.java index 8f772c551..c5e2d7e27 100644 --- a/test/core/src/test/java/org/gatein/wci/test/requestdispatch/RequestDispatchServlet.java +++ b/test/core/src/test/java/org/gatein/wci/test/requestdispatch/RequestDispatchServlet.java @@ -16,17 +16,18 @@ */ package org.gatein.wci.test.requestdispatch; +import java.io.IOException; + import org.gatein.wci.ServletContainer; import org.gatein.wci.ServletContainerFactory; import org.gatein.wci.ServletContextDispatcher; import org.gatein.wci.WebApp; import org.gatein.wci.test.WebAppRegistry; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** @author Julien Viet */ public class RequestDispatchServlet extends HttpServlet diff --git a/test/core/src/test/java/org/gatein/wci/test/servletlistener/ListenerServlet.java b/test/core/src/test/java/org/gatein/wci/test/servletlistener/ListenerServlet.java index cc722a9a9..71378e95d 100644 --- a/test/core/src/test/java/org/gatein/wci/test/servletlistener/ListenerServlet.java +++ b/test/core/src/test/java/org/gatein/wci/test/servletlistener/ListenerServlet.java @@ -16,18 +16,19 @@ */ package org.gatein.wci.test.servletlistener; +import java.io.IOException; + import org.gatein.wci.RequestDispatchCallback; import org.gatein.wci.ServletContainer; import org.gatein.wci.ServletContainerFactory; import org.gatein.wci.WebApp; import org.gatein.wci.test.WebAppRegistry; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * @author Ken Finnigan diff --git a/test/core/src/test/java/org/gatein/wci/test/servletlistener/ServletEventCountListener.java b/test/core/src/test/java/org/gatein/wci/test/servletlistener/ServletEventCountListener.java index 170795f50..eb6901db7 100644 --- a/test/core/src/test/java/org/gatein/wci/test/servletlistener/ServletEventCountListener.java +++ b/test/core/src/test/java/org/gatein/wci/test/servletlistener/ServletEventCountListener.java @@ -16,8 +16,8 @@ */ package org.gatein.wci.test.servletlistener; -import javax.servlet.ServletRequestEvent; -import javax.servlet.ServletRequestListener; +import jakarta.servlet.ServletRequestEvent; +import jakarta.servlet.ServletRequestListener; /** * @author Ken Finnigan diff --git a/test/servers/tomcat8/pom.xml b/test/servers/tomcat8/pom.xml index a4a95b70d..bc3619103 100644 --- a/test/servers/tomcat8/pom.xml +++ b/test/servers/tomcat8/pom.xml @@ -51,7 +51,7 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. org.jboss.arquillian.container - arquillian-tomcat-embedded-9 + arquillian-tomcat-embedded-10 test @@ -59,6 +59,11 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. arquillian-junit-container test + + org.jboss.arquillian.test + arquillian-test-api + test + org.apache.tomcat.embed tomcat-embed-core @@ -68,13 +73,13 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. tomcat-embed-jasper - javax.servlet.jsp - javax.servlet.jsp-api + jakarta.servlet.jsp + jakarta.servlet.jsp-api provided - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/tomcat/src/main/java/org/gatein/wci/command/TomcatCommandDispatcher.java b/tomcat/src/main/java/org/gatein/wci/command/TomcatCommandDispatcher.java index 46092eff5..e50eb6117 100644 --- a/tomcat/src/main/java/org/gatein/wci/command/TomcatCommandDispatcher.java +++ b/tomcat/src/main/java/org/gatein/wci/command/TomcatCommandDispatcher.java @@ -16,16 +16,17 @@ */ package org.gatein.wci.command; +import java.io.IOException; + import org.gatein.wci.RequestDispatchCallback; import org.gatein.wci.ServletContainerFactory; import org.gatein.wci.ServletContainerVisitor; import org.gatein.wci.WebApp; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * @author Ken Finnigan diff --git a/tomcat/src/main/java/org/gatein/wci/tomcat/TomcatContainerServlet.java b/tomcat/src/main/java/org/gatein/wci/tomcat/TomcatContainerServlet.java index 7ae9d6f13..bb453a691 100644 --- a/tomcat/src/main/java/org/gatein/wci/tomcat/TomcatContainerServlet.java +++ b/tomcat/src/main/java/org/gatein/wci/tomcat/TomcatContainerServlet.java @@ -26,10 +26,11 @@ import org.apache.catalina.ContainerServlet; import org.apache.catalina.Engine; import org.apache.catalina.Wrapper; -import org.slf4j.LoggerFactory; import org.slf4j.Logger; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; +import org.slf4j.LoggerFactory; + +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; /** * @author Alain Defrance diff --git a/tomcat/src/main/java/org/gatein/wci/tomcat/TomcatServletContainerContext.java b/tomcat/src/main/java/org/gatein/wci/tomcat/TomcatServletContainerContext.java index 9a6888779..adb61cada 100644 --- a/tomcat/src/main/java/org/gatein/wci/tomcat/TomcatServletContainerContext.java +++ b/tomcat/src/main/java/org/gatein/wci/tomcat/TomcatServletContainerContext.java @@ -22,6 +22,12 @@ ******************************************************************************/ package org.gatein.wci.tomcat; +import java.io.IOException; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + import org.apache.catalina.Container; import org.apache.catalina.ContainerEvent; import org.apache.catalina.ContainerListener; @@ -33,8 +39,6 @@ import org.apache.catalina.LifecycleListener; import org.apache.catalina.LifecycleState; import org.apache.catalina.core.StandardContext; -import org.slf4j.LoggerFactory; -import org.slf4j.Logger; import org.gatein.wci.RequestDispatchCallback; import org.gatein.wci.ServletContainer; import org.gatein.wci.ServletContainerFactory; @@ -45,17 +49,14 @@ import org.gatein.wci.session.SessionTask; import org.gatein.wci.session.SessionTaskVisitor; import org.gatein.wci.spi.ServletContainerContext; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; -import java.io.IOException; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; /** * An implementation of the ServletContainerContext for Tomcat 7. diff --git a/tomcat/src/main/java/org/gatein/wci/tomcat/TomcatWebAppContext.java b/tomcat/src/main/java/org/gatein/wci/tomcat/TomcatWebAppContext.java index 7b93f8d1f..067f88279 100644 --- a/tomcat/src/main/java/org/gatein/wci/tomcat/TomcatWebAppContext.java +++ b/tomcat/src/main/java/org/gatein/wci/tomcat/TomcatWebAppContext.java @@ -24,17 +24,17 @@ import java.io.IOException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletRequestEvent; -import javax.servlet.ServletRequestListener; -import javax.servlet.http.HttpSession; - import org.apache.catalina.Context; import org.apache.catalina.Manager; import org.apache.catalina.Session; import org.apache.catalina.Wrapper; import org.gatein.wci.spi.CatalinaWebAppContext; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletRequestEvent; +import jakarta.servlet.ServletRequestListener; +import jakarta.servlet.http.HttpSession; + /** * @author Alain Defrance * @version $Revision: 1.0 $ diff --git a/wci/pom.xml b/wci/pom.xml index 07fe19306..195cbf002 100644 --- a/wci/pom.xml +++ b/wci/pom.xml @@ -28,8 +28,8 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api ch.qos.logback diff --git a/wci/src/main/java/org/gatein/wci/RequestDispatchCallback.java b/wci/src/main/java/org/gatein/wci/RequestDispatchCallback.java index 42ae3c0c4..56a8d5b08 100644 --- a/wci/src/main/java/org/gatein/wci/RequestDispatchCallback.java +++ b/wci/src/main/java/org/gatein/wci/RequestDispatchCallback.java @@ -22,12 +22,13 @@ ******************************************************************************/ package org.gatein.wci; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; import java.io.IOException; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + /** * Callback contract. * diff --git a/wci/src/main/java/org/gatein/wci/ServletContainer.java b/wci/src/main/java/org/gatein/wci/ServletContainer.java index af5420ffc..e4c26e77d 100644 --- a/wci/src/main/java/org/gatein/wci/ServletContainer.java +++ b/wci/src/main/java/org/gatein/wci/ServletContainer.java @@ -30,13 +30,6 @@ import java.util.Vector; import java.util.concurrent.CopyOnWriteArrayList; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - import org.gatein.wci.api.GateInServlet; import org.gatein.wci.authentication.AuthenticationEvent; import org.gatein.wci.authentication.AuthenticationEventType; @@ -46,8 +39,15 @@ import org.gatein.wci.security.Credentials; import org.gatein.wci.spi.ServletContainerContext; import org.gatein.wci.spi.WebAppContext; -import org.slf4j.LoggerFactory; import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; /** * A static registry for the servlet container context. @@ -591,5 +591,6 @@ public void fireRequestDestroyed(ServletRequest servletRequest) { context.fireRequestDestroyed(servletRequest); } + } } diff --git a/wci/src/main/java/org/gatein/wci/ServletContextDispatcher.java b/wci/src/main/java/org/gatein/wci/ServletContextDispatcher.java index 90e84a28e..8b9768c2e 100644 --- a/wci/src/main/java/org/gatein/wci/ServletContextDispatcher.java +++ b/wci/src/main/java/org/gatein/wci/ServletContextDispatcher.java @@ -22,12 +22,13 @@ ******************************************************************************/ package org.gatein.wci; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + /** * Encapsulate dispatch functionnality into a single class so it is easy to * pass it as an argment to a framework that needs a dispatcher to just a diff --git a/wci/src/main/java/org/gatein/wci/WebApp.java b/wci/src/main/java/org/gatein/wci/WebApp.java index d89e6c903..36fd13e00 100644 --- a/wci/src/main/java/org/gatein/wci/WebApp.java +++ b/wci/src/main/java/org/gatein/wci/WebApp.java @@ -22,12 +22,12 @@ ******************************************************************************/ package org.gatein.wci; -import javax.servlet.ServletContext; -import javax.servlet.ServletRequest; -import javax.servlet.http.HttpSession; - -import java.io.InputStream; import java.io.IOException; +import java.io.InputStream; + +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.http.HttpSession; /** * Abstraction of a web application. diff --git a/wci/src/main/java/org/gatein/wci/api/GateInServlet.java b/wci/src/main/java/org/gatein/wci/api/GateInServlet.java index 7871febef..9b6cea7fe 100644 --- a/wci/src/main/java/org/gatein/wci/api/GateInServlet.java +++ b/wci/src/main/java/org/gatein/wci/api/GateInServlet.java @@ -27,7 +27,7 @@ import org.gatein.wci.spi.SimpleWebAppContext; import org.gatein.wci.spi.WebAppContext; -import javax.servlet.ServletException; +import jakarta.servlet.ServletException; /** * @author Julien Viet diff --git a/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java b/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java index 625d7b9c2..8aa6e9a59 100644 --- a/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java +++ b/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java @@ -20,8 +20,8 @@ import org.gatein.wci.security.Credentials; import org.gatein.wci.spi.ServletContainerContext; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * @author Alain Defrance diff --git a/wci/src/main/java/org/gatein/wci/command/CommandDispatcher.java b/wci/src/main/java/org/gatein/wci/command/CommandDispatcher.java index 16c9c3a5e..4602ae04c 100644 --- a/wci/src/main/java/org/gatein/wci/command/CommandDispatcher.java +++ b/wci/src/main/java/org/gatein/wci/command/CommandDispatcher.java @@ -22,13 +22,14 @@ ******************************************************************************/ package org.gatein.wci.command; +import java.io.IOException; + import org.gatein.wci.RequestDispatchCallback; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * @author Julien Viet diff --git a/wci/src/main/java/org/gatein/wci/command/CommandServlet.java b/wci/src/main/java/org/gatein/wci/command/CommandServlet.java index e80475175..1f0a87e85 100644 --- a/wci/src/main/java/org/gatein/wci/command/CommandServlet.java +++ b/wci/src/main/java/org/gatein/wci/command/CommandServlet.java @@ -22,16 +22,17 @@ ******************************************************************************/ package org.gatein.wci.command; -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import jakarta.servlet.RequestDispatcher; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + /** * This servlet is used to execute command coming from another context through a dispatching request. The invocation is * detyped in order to allow redeployment and avoid class cast exception. diff --git a/wci/src/main/java/org/gatein/wci/session/SessionTask.java b/wci/src/main/java/org/gatein/wci/session/SessionTask.java index 29fe496f8..bf145a21c 100644 --- a/wci/src/main/java/org/gatein/wci/session/SessionTask.java +++ b/wci/src/main/java/org/gatein/wci/session/SessionTask.java @@ -21,7 +21,7 @@ */ package org.gatein.wci.session; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; /** * @author Marek Posolda diff --git a/wci/src/main/java/org/gatein/wci/session/SessionTaskVisitor.java b/wci/src/main/java/org/gatein/wci/session/SessionTaskVisitor.java index bc14927ca..1b06ac56f 100644 --- a/wci/src/main/java/org/gatein/wci/session/SessionTaskVisitor.java +++ b/wci/src/main/java/org/gatein/wci/session/SessionTaskVisitor.java @@ -21,11 +21,11 @@ */ package org.gatein.wci.session; -import javax.servlet.http.HttpSession; - import org.gatein.wci.ServletContainerVisitor; import org.gatein.wci.WebApp; +import jakarta.servlet.http.HttpSession; + /** * Wrapper around {@link SessionTask}. The point of this visitor is the possibility to run given task on every existing HTTP session * with given sessionID in all deployed web applications diff --git a/wci/src/main/java/org/gatein/wci/spi/CatalinaWebAppContext.java b/wci/src/main/java/org/gatein/wci/spi/CatalinaWebAppContext.java index 734519a72..bf3a6d8c1 100644 --- a/wci/src/main/java/org/gatein/wci/spi/CatalinaWebAppContext.java +++ b/wci/src/main/java/org/gatein/wci/spi/CatalinaWebAppContext.java @@ -16,16 +16,18 @@ */ package org.gatein.wci.spi; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.gatein.wci.command.CommandServlet; +import java.io.IOException; +import java.io.InputStream; import javax.naming.InitialContext; import javax.naming.NamingException; -import javax.servlet.ServletContext; -import javax.servlet.ServletRequest; -import java.io.IOException; -import java.io.InputStream; + +import org.gatein.wci.command.CommandServlet; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletRequest; /** * @author Ken Finnigan diff --git a/wci/src/main/java/org/gatein/wci/spi/ServletContainerContext.java b/wci/src/main/java/org/gatein/wci/spi/ServletContainerContext.java index ebebb4172..48d49e9db 100644 --- a/wci/src/main/java/org/gatein/wci/spi/ServletContainerContext.java +++ b/wci/src/main/java/org/gatein/wci/spi/ServletContainerContext.java @@ -24,15 +24,15 @@ import java.io.IOException; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - import org.gatein.wci.RequestDispatchCallback; import org.gatein.wci.authentication.AuthenticationException; import org.gatein.wci.security.Credentials; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + /** * Defines the service provider interface for a servlet container. It is an attempt to abstract the non * portable services required by a portal with respect to the web container layer. diff --git a/wci/src/main/java/org/gatein/wci/spi/SimpleWebAppContext.java b/wci/src/main/java/org/gatein/wci/spi/SimpleWebAppContext.java index 2adee248e..51c8d6080 100644 --- a/wci/src/main/java/org/gatein/wci/spi/SimpleWebAppContext.java +++ b/wci/src/main/java/org/gatein/wci/spi/SimpleWebAppContext.java @@ -22,13 +22,12 @@ ******************************************************************************/ package org.gatein.wci.spi; -import org.gatein.wci.spi.WebAppContext; - -import javax.servlet.ServletContext; -import javax.servlet.ServletRequest; -import javax.servlet.http.HttpSession; -import java.io.InputStream; import java.io.IOException; +import java.io.InputStream; + +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.http.HttpSession; /** * @author Julien Viet diff --git a/wci/src/main/java/org/gatein/wci/spi/WebAppContext.java b/wci/src/main/java/org/gatein/wci/spi/WebAppContext.java index 0ffcb679d..38d3af009 100644 --- a/wci/src/main/java/org/gatein/wci/spi/WebAppContext.java +++ b/wci/src/main/java/org/gatein/wci/spi/WebAppContext.java @@ -22,12 +22,12 @@ ******************************************************************************/ package org.gatein.wci.spi; -import javax.servlet.ServletContext; -import javax.servlet.ServletRequest; -import javax.servlet.http.HttpSession; - -import java.io.InputStream; import java.io.IOException; +import java.io.InputStream; + +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.http.HttpSession; /** * A web application context.