I\'m using Eclipse Oxygen.2 (4.7.2) on Windows 10 with Java 8. I have a faceted project I run inside Eclipse using Tomcat. I had been using Tomcat 8.5, but on a new system I
I reproduced the problem in the same environment as yours. When I tried to regress from 4.0 back to 3.1 I got the following error:
This blog provided the solution (which is a bit of a hack but it works):
Also see this SO question: Dynamic Web Module 3.0 -- 3.1
A couple of related issues:
It looks like something else may not be quite right with your setup to be getting that error "Tomcat version 9.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5, 6, 7, and 8 Web modules". Is your project configured to use Servlet 4.0? For my Maven project I had to add this dependency to the POM for Servlet 4.
Even after changing the Dynamic Web Module version to 3.1 my web app continued using version 4.0, so I'm not sure what that facet achieves.