I would like to know if there is currently any compatibility problem between version 7/8 of VAADIN and tomcat 10
-
Are you asking because you are facing a problem? Please add the informations about it, like logs, stacktraces, errors... – cfrick May 21 '21 at 05:55
1 Answers
tl;dr
- Tomcat 9 and 10 are essentially the same.
- Only difference is
javax.*
package naming versusjakarta.*
, respectively.
- Only difference is
- Currently for Vaadin, use Tomcat 9, not 10.
Ditto for competitors to Tomcat. Example: Use Jetty 10, not 11.
jakarta.*
Yes, there is one simple but big problem.
Vaadin is still coded to the javax.*
package naming of the Java EE technologies on which it is built. This includes Servlet technology.
With Oracle transferring responsibility for Java EE technologies to the Eclipse Foundation, the naming of those technologies has changed from Java EE to Jakarta EE (Java™ being a trademark of Oracle). As part of that transition, the package names of the interfaces and classes defined in Jakarta EE technologies are changing from javax.*
to jakarta.*
.
This new package name is a breaking change for all the decades of software written for Java EE. While an unfortunate problem, the fix is utterly simple: Rename the package line at the top of all the source files.
The Jakarta EE project has done just that in version 9 of Jakarta EE. Most of the relevant technologies have had their individual version numbers incremented, but are otherwise substantially the same as their previous versions (renaming their package is the only significant change). See the 2020 newsletter from Eclipse Foundation, Understanding Jakarta EE 9 .
The Tomcat project now runs two parallel versions: 9 and 10.
- Tomcat 9 uses the old package naming:
javax.*
- Tomcat 10 uses the new package naming:
jakarta.*
Both are simultaneously being developed; 10 is not “better” than 9.
If starting a greenfield project, and you are using only libraries that have made the package name change, you may choose to use Tomcat 10.
If using libraries that have not yet made the package name change, use Tomcat 9. Vaadin is one such library still using the old package name.
➥ So, for now, your Vaadin projects should be run with version 9 of Tomcat rather than 10. No loss here, as Tomcat 9 and 10 are essentially the same.
There is no urgent need to make the javax.*
-to-jakarta.*
transition yet. Eventually, I expect we will see releases of Vaadin transition to the new package naming. There is talk of tooling to help with this change, both in the Vaadin camp as well as the wider Jakarta EE world, though I am not aware of their current status.
Of course, the other alternatives/competitors to Tomcat are going through the same transition pains. For example, Eclipse Jetty 11 uses the new package naming while Jetty 10 is in parallel development with an identical feature set, as explained in this post by WebTide. If using Jetty for your Vaadin development or deployment, you would be using Jetty 10 rather than 11.
Servlet 3.1
All versions of Vaadin today (2021-05) are built against the Servlet 3.1 specification, rather than Servlet 4 or Servlet 5. See the documentation page, Apache Tomcat Versions for a table of which Tomcat supports which Servlet spec.
So no need even for Tomcat 9 in that regard. Tomcat 8.5 supports Servlet 3.1, so it will suffice for current Vaadin apps. FYI, Tomcat 8.5 was originally forked from early Tomcat 9, and contains mostly the same features.

- 303,325
- 100
- 852
- 1,154
-
The [Tomcat Migration Tool](https://tomcat.apache.org/download-migration.cgi) can jakartify an application in both source and compiled form. It is distributed with Tomcat 10, so one can deploy a legacy WAR file by dropping it into the `webapps-javaee` folder. However I agree: there is no need to migrate to Tomcat 10.0. Jakarta EE 10 (Tomcat 10.1) on the other hand will bring some new functionality. – Piotr P. Karwasz May 21 '21 at 04:40
-
@PiotrP.Karwasz If I understand correctly, that migration tool would change the source code of my application to use `jakarta.*` naming. But that tool cannot change the fact that the current Vaadin libraries are compiled against the `javax.*` package names. Therefore at runtime Vaadin will fail to find the necessary Servlet and other API within the web container (within Tomcat). – Basil Bourque May 21 '21 at 05:29
-
the migration tool converts also binary files. Last time I checked class files, JAR files and WAR files were supported. So one can also jakartify Vaadin's runtime, although I wouldn't use it in production: It might miss some reflection hacks. – Piotr P. Karwasz May 21 '21 at 06:04