I'm trying to deploy a very simple HTTPServlet project using Tomcat 7 in my Eclipse J2EE perspective. I am getting the error "Tomcat version 7.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 and 6 Web modules". I have already tried modifying my org.eclipse.wst.common.project.facet.core.xml as mentioned here file but that doesn't seem to fix the issue. I'm able to deploy just fine by using file->export->.war directly to my installed tomcat server. Any ideas?
Go to Project Properties -> Project Facets and change the version of Dynamic Web Module. If it is set to 3.1 then change it to 3.0. In case it does not allow you to change the version, uncheck it and press apply. Then you can select the version, check it and apply-OK. Worked for me!
Yes, using Maven, Spring project with Java EE compliance we face this issue with Tomcat. To fix this problem please execute the list of commands to make the project as Java EE compliance.
$ mvn eclipse:clean
- to clean the eclipse files like .project .classpath$ mvn eclipse:eclipse -Dwtpversion=2.0
to create the eclipse compatible with Java EE.At last open the project in eclipse select the server tomcat now click run on servers(Alt+Shift+x,R) select tomcat7.0 to run.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With