Can web application worked both in Tomcat 10 and Tomcat 9

1.5k Views Asked by At

From tomcat's migration documentation, we know there is a big change from Tomcat 9 to Tomcat 10 which is the specification APIs has changed from javax... to jakarta....

So I using Tomcat migration tool to change a web application from javax.* to jakarta.*. And deployed the migrated war into Tomcat 10, it works successfully.

I want to do some changes with the migrated war to ensure it also can be deployed in Tomcat 9. I have tried put Tomcat 10's servlet-api.jar into application's WEB-INF/lib but it failed due to some classes cannot be casted to class javax.servlet.Filter.

Is there any workaround if want to ensure a web application worked both in Tomcat 10 and Tomcat 9?

0

There are 0 best solutions below