Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat version 7.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 and 6 Web modules

Tags:

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?

like image 683
Jason Avatar asked Aug 01 '14 20:08

Jason


2 Answers

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!

like image 50
Piyush Vashisht Avatar answered Sep 21 '22 10:09

Piyush Vashisht


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.

  1. $ mvn eclipse:clean - to clean the eclipse files like .project .classpath
  2. $ 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.

like image 28
Pavan Avatar answered Sep 21 '22 10:09

Pavan