1:找到eclips创建的web工程下的.project文件
在<natures></natures>标签中加上
<nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>一条
2:在.project文件同目录下 加上一个.mymetadata文件
贴上以下内容
<?xml version="1.0" encoding="UTF-8"?>
<project-module
type="WEB"
name="你的项目名称"
id="myeclipse.1270694067980"
context-root="/你的项目名称"
j2ee-spec="5.0"
archive="你的项目名称.war或.jar">
<attributes>
<attribute name="webrootdir" value="/项目根路径目录webRoot或webapp.." />
</attributes>
</project-module>