1.修改项目名称方法:首先修改项目中.project文件的name属性
<projectDescription>
<name>echo1</name>
.................
....
然后在项目部署到tomcat中的时候出现以下错误:
An existing resource has been found at location....
2.修改.mymetdata文件中的context-root="/echo"将其中“echo”修改成你修改后的项目名称,最后记得要重起eclipse,重新布署项目就不会出现上面的错误了。
.mymetdata内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<project-module
type="WEB"
name="echo"
id="myeclipse.1217645899031"
context-root="/echo"
j2ee-spec="1.4"
archive="echo.war">
<attributes>
<attribute name="webrootdir" value="WebRoot" />
</attributes>
</project-module>
-------------------------------转载自网络
时间: 2024-07-30 15:32:25