Migrating from Tomcat 9 to Tomcat 10
Check the servlet namespace, library compatibility and Java runtime before moving a Tomcat 9 application to the Tomcat 10.1 line.
- Source namespace
- javax.servlet
- Target namespace
- jakarta.servlet
- Tomcat 10.1 minimum
- Java 11
Which packages change?
Moving from Tomcat 9 to the Jakarta Servlet API requires updating servlet references in application code and dependencies. A blanket replacement of every javax package can also change unrelated Java SE APIs.
Inventory filters, listeners, JSP tag libraries and framework versions. Identify which dependencies already publish a Jakarta-compatible artifact and rebuild the application against the chosen target.
Which Java runtime does the target require?
Select the Tomcat 10 minor line before choosing the deployment JDK. Apache publishes separate Java requirements and migration notes for the 10.0 and 10.1 lines.
Check the JVM in the actual container image or service wrapper. Enter the production JDK and proposed Tomcat branch in the Java support lifecycle calculator to compare their remaining support windows. An application that compiles on a developer machine can still fail at startup when production points to an older JDK.
What should pass before switching traffic?
A Tomcat cutover is ready when the rebuilt application starts on the target server and representative requests pass against its real integrations. A clean startup log alone leaves authentication, servlet filters and persistence untested.
Stage a fresh target configuration. Exercise login, a session renewal, an error page and a database transaction. Retain the previous artifact and configuration until rollback has been rehearsed.
Can the Apache migration tool help with dependencies?
The tool can transform Java EE applications for Jakarta EE use. Treat its output as a migration candidate and run the same application tests you would use for a source-level rebuild.