When setting up the OpenELIS Global 2 backend project in Eclipse IDE, Tomcat 9 cannot recognize the web module and shows the following error when adding the project to the server: Tomcat version 9.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5, 6, 7, and 8 Web modules
Steps to Reproduce
-
Import OpenELIS-Global-2 project into Eclipse as mention in the docs.
-
Install Tomcat 9 and configure it as a Server inside Eclipse
-
Try to add the OpenELIS-Global-2 project to Tomcat
-
Error appears and project is not added
Observed Behavior :-
Eclipse blocks adding the project to Tomcat 9 because it detects an incompatible Dynamic Web Module / servlet version.
Expected Behavior :-
The project should be deployable on Tomcat 9, as the documentation recommends using Tomcat 9 for local development.
Possible Cause
Tomcat 9 only supports Java EE / javax.* (Servlet 4.0 or earlier).
So Eclipse blocks adding the project to Tomcat and shows:
“Tomcat version 9.0 only supports J2EE 1.2–1.4 and Java EE 5–8 web modules”
Suggested Fix -
Since the project uses Jakarta EE namespaces (jakarta.servlet.*) and a web.xml version 5.0 or higher, Tomcat 9 cannot run the application.
Tomcat 9 only supports Java EE / javax.servlet (Servlet 4.0), while this project requires Jakarta EE / jakarta.servlet (Servlet 5.0+).
Therefore, the development environment should be updated to use Tomcat 10.1, which fully supports Jakarta EE .
