Target runtime Apache Tomcat v6.0 is not defined. Error Solution

Source: Internet
Author: User

After eclipse is imported into the project, a Red Cross is displayed on 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></faceted-project>
 

PS: After the above modification, although there is no error, but the "run as"-> "run on server" option is not found when you want to release the website demo. At this time, we create a demo2 web project, and then view org. Eclipse. WST. Common. Project. facet. Core. xml under. settings. The content is:

<?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" />   <installed facet="jst.web" version="2.5" />   <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.