Skip to content

Commit

Permalink
feat: Upgrade To Tomcat 10 - Meeds-io/MIPs#76
Browse files Browse the repository at this point in the history
  • Loading branch information
boubaker committed Aug 28, 2023
1 parent ed4888e commit e0198bd
Show file tree
Hide file tree
Showing 31 changed files with 163 additions and 140 deletions.
4 changes: 2 additions & 2 deletions test/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,20 @@
*/
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;
import org.gatein.wci.authentication.AuthenticationException;
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 <a href="mailto:[email protected]">Julien Viet</a> */
public class AuthenticationServlet extends HttpServlet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@
*/
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;
import org.gatein.wci.WebApp;
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 <a href="mailto:[email protected]">Julien Viet</a> */
public class CrossContextServlet extends HttpServlet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 <a href="mailto:[email protected]">Julien Viet</a> */
public abstract class AbstractDeploymentTestCase extends AbstractWCITestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="mailto:[email protected]">Julien Viet</a> */
public class NativeSkipFilter implements ServletContextListener
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 <a href="mailto:[email protected]">Julien Viet</a> */
public abstract class AbstractRequestDispatchTestCase extends AbstractWCITestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="mailto:[email protected]">Julien Viet</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="mailto:[email protected]">Julien Viet</a> */
public class RequestDispatchServlet extends HttpServlet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="http://community.jboss.org/people/kenfinni">Ken Finnigan</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="http://community.jboss.org/people/kenfinni">Ken Finnigan</a>
Expand Down
15 changes: 10 additions & 5 deletions test/servers/tomcat8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,19 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<!-- Arquillian container -->
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-tomcat-embedded-9</artifactId>
<artifactId>arquillian-tomcat-embedded-10</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.test</groupId>
<artifactId>arquillian-test-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
Expand All @@ -68,13 +73,13 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<artifactId>tomcat-embed-jasper</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<groupId>jakarta.servlet.jsp</groupId>
<artifactId>jakarta.servlet.jsp-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="http://community.jboss.org/people/kenfinni">Ken Finnigan</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="mailto:[email protected]">Alain Defrance</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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 <code>ServletContainerContext</code> for Tomcat 7.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="mailto:[email protected]">Alain Defrance</a>
* @version $Revision: 1.0 $
Expand Down
4 changes: 2 additions & 2 deletions wci/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
Loading

0 comments on commit e0198bd

Please sign in to comment.