Upgrading Tomcat 7.0 - 8.5 or 9.0?
Solution 1:
There isn't a lot of difference between Tomcat 8.5 and 9.0: the former started as a fork of the first pre-release versions of Tomcat 9.0. Since the big changes in Java EE Servlet API came with version 3.0 (which is supported by Tomcat 7.0) I don't foresee any major problems with the migration to a newer Tomcat release.
I would choose Tomcat 9.0, since it is the "last version you'll ever need", meaning that Tomcat 10.0 will use a binary incompatible standard Jakara EE Servlet 5.0 (basically they renamed the packages from javax.servlet
to jakarta.servlet
), so I think that Tomcat 9.0 will be around for a very long time.
Some things to take in mind during migration:
- setup a test server first, things like to break in unexpected ways,
- stick with Java SE 8.0, since it will be supported at least until May 2026 and because newer versions lack many Java EE APIs, which your applications may rely on (most notably JAXB),
- if you use a container managed connection pool, Tomcat 7.0 used
commons-dbcp
, while Tomcat 8.0+ usescommons-dbcp2
, so you may want to tweak the connection pool parameters,
You don't mention the system you run Tomcat on. If you use Windows, I've seen many clients make the mistake to install a 32-bit Java (it's the first result you find on Google), which limits the available memory to around 2 GiB.