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?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
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!
1)Go to your project on folder in eclipse workspace.
2)Open the .setting folder
3)Open the "org.eclipse.wst.common.project.facet.core" xml file
4)Update the version in last line as 2.4 or 2.5
5)Refresh the project and try to run on server
For Tomcat Version 6
In project, .settings folder OR Or CTRL+SHIFT+R : find this file
org.eclipse.wst.common.project.facet.core.xml
change the version of facet=jst.web to 2.4 or 2.5
File : org.eclipse.wst.common.project.facet.core.xml
Tomcat 7 You need facet="jst.web" version="3.0" to deploy on Tomcat 7.
This problem can be resolved by by changing the Dynamic Web Module version to 3.0. This can be done in 2 ways.
Goto project properties and click on project facets, now you see the option
Dynamic Web Module
, change it to 3.0For those who can't change the version in the above step, open
org.eclipse.wst.common.project.facet.core.xml
and change the version here to something like<installed facet="jst.web" version="3.0"/>
Now go to project facets and see the
Dynamic Web Module
version changed to3.0
For Tomcat 8.5 if you are facing this issue, change your facet setting to 3.1
Open file : {project_Folder}/.setting/org.eclipse.wst.common.project.facet.core
Open org.eclipse.wst.common.project.facet.core XML file. Change to version as 3.1 Save and refresh the project you will find it you can add the resource to tomcat.
This worked for me.. Thanks
To Solve this Issue You will have to update your
Dynamic Web Module
version from3.1 to 3.0
. Eclipse dosen't allow these updation directly viaBuild Path-->Configure Build Path-->Project Facets
.Follow these steps Open file :
YourPrjectFolder/.setting/org.eclipse.wst.common.project.facet.core
org.eclipse.wst.common.project.facet.core
XML document.<installed facet="jst.web" version="3.1"/>
to<installed facet="jst.web" version="3.0"/>
You will be able to publish the your project now on Tomcat 7.