Solution to the error of Target runtime Apache Tomcat v6.0 is not defined.

Source: Internet
Author: User
Tags tomcat apache tomcat

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.