Target runtime Apache Tomcat v6.0 is not defined. this error is reported because after a ready-made project is imported, the Tomcat version configured in MyEclipse is different from the current Tomcat version. The solution is as follows:
Select the current Project and click the icon (Deploy MyEclipse J2EE Project to Server...) in the menu bar of MyEclipse ...), click add on the page that appears, select Tomcat configured in current MyEclipse in server, and click Finish.
But some of my friends still cannot solve the problem through the above method. Let's look at it later.
<? Xml version = "1.0" encoding = "UTF-8"?>
<Faceted-project>
<Runtime name = "Apache Tomcat v8.0"/> tomcat version
<Fixed facet = "java"/>
<Fixed facet = "jst. web"/>
<Fixed facet = "wst. jsdt. web"/>
<Installed facet = "java" version = "1.6"/> jdk version
<Installed facet = "jst. web" version = "3.1" type = "regxph" text = "yourobjectname"/>
<Installed facet = "wst. jsdt. web" version = "1.0"/>
</Faceted-project>
A Red Cross is displayed on the project after the project, but there is no file error or syntax error in the project. I cannot explain it, later, I found some documents on the Internet saying that the path of the class library referenced by the project is incorrect. [Project]-> [right-click]-> [build path]-> [configure build path]-> [libraries] to view the referenced class library path. It is said on the Internet that the reference error is caused, but the first thing I do during project import is to modify the library here, so this is not the reason.
The error displayed in problems is: Target runtime Apache Tomcat 6.0 is not defined. I checked it online and finally found a solution. In the. settings folder under the project Directory, open the org. eclipse. wst. common. project. facet. core. xml file with the following content:
<? Xmlversion = "1.0" encoding = "UTF-8"?>
<Faceted-project>
<Runtimename = "Apache Tomcat v6.0"/>
<Fixedfacet = "jst. web"/>
<Fixedfacet = "jst. java"/>
<Installedfacet = "jst. java" version = "6.0"/>
<Installedfacet = "jst. web" version = "2.5"/>
<Installedfacet = "wst. jsdt. web" version = "1.0"/>
</Faceted-project>
Modify it:
<? Xml version = "1.0" encoding = "UTF-8"?>
<Faceted-project>
<Runtime name = "Apache Tomcat v6.0.29"/>
<Fixed facet = "jst. web"/>
<Fixed facet = "java"/>
<Fixed facet = "wst. jsdt. web"/>
<Installed facet = "java" version = "1.6" type = "codeph" text = "/codeph"/>
<Installed facet = "jst. web" version = "2.5" type = "regxph" text = "yourobjectname"/>
<Installed facet = "wst. jsdt. web" version = "1.0"/>
</Faceted-project>
Then we only need to copy the code to the. settings directory under the website demo and overwrite the original org. eclipse. wst. common. project. facet. core. xml. After overwriting, we can use [run as]-> [run on server] in Eclipse to release the demo.