---
title: "Target runtime Apache Tomcat 6.0 is not defined."
author: "macleo"
date: "2011-05-22T13:44:31Z"
tags: ["Apache", "Eclipse", "Tomcat", "Web", "XML"]
categories: ["非技术"]
slug: "target-runtime-apache-tomcat-6-0-is-not-defined"
draft: false
lastmod: "2011-05-22T13:45:37Z"
id: 1054376
url: "https://macleo.iteye.com/blog/1054376"
---

[http://hi.baidu.com/annleecn/blog/item/a26d49a6f53fc79cd143583b.html/cmtid/7d5f022599936825d4074280](http://hi.baidu.com/annleecn/blog/item/a26d49a6f53fc79cd143583b.html/cmtid/7d5f022599936825d4074280)

 

 

刚下了7.0.14的Tomcat.....导入后就提示:Target runtime Apache Tomcat 6.0 is not defined.

 

 

unknow 写道

在他们机器上整合好的工程在我机器上总是出现Target runtime Apache Tomcat 6.0 is 解决not defined.这个错误，找工程属性也没有，后来网上找到的方法。

　　在工程目录下的.settings文件夹里，打开org.eclipse.wst.common.project.facet.core.xml文件，其内容是：

&lt;?xml version="1.0" encoding="UTF-8"?&gt;  
&lt;faceted-project&gt;  
&lt;runtime name="Apache Tomcat v6.0"/&gt;  
&lt;fixed facet="jst.web"/&gt;  
&lt;fixed facet="jst.java"/&gt;  
&lt;installed facet="jst.java" version="5.0"/&gt;  
&lt;installed facet="jst.web" version="2.4"/&gt;  
&lt;/faceted-project&gt;

不要删了文件也不要全删除，要不还会有错误，删除中间几行，只留下下面三行就行

&lt;?xml version="1.0" encoding="UTF-8"?&gt;  
&lt;faceted-project&gt;  
&lt;/faceted-project&gt;

 

以下是tomcat7.0.14正常后的org.eclipse.wst.common.project.facet.core.xml

```
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <fixed facet="jst.web"/>
  <fixed facet="java"/>
  <fixed facet="wst.jsdt.web"/>
  <installed facet="java" version="1.5"/>
  <installed facet="jst.web" version="2.5"/>
  <installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
```