原因:在工程转移过程中,导致工程的配置文件出错;
解决方法:
1.在工程目录下的.mymetadata文件中可能webrootdir被改无效了;或者有可能少了这context-root这个属性,添加上这个属性即可,内容如下:
context-root="/name属性值"
2.重启Eclipse,发布成功。
1.在工程目录下的.mymetadata文件中可能webrootdir被改无效了;或者有可能少了这context-root这个属性,添加上这个属性即可,内容如下:
context-root="/name属性值"
2.重启Eclipse,发布成功。
<span style="color:#333333;"><?xml version="1.0" encoding="UTF-8"?>
<project-module
type="WEB"
name="five5"
id="myeclipse.1418263100952"
j2ee-spec="1.4"
</span><span style="color:#ff0000;"> context-root="/five5" </span><span style="color:#333333;">
archive="five5.war">
<attributes>
</span><span style="color:#ff0000;"> <attribute name="webrootdir" value="WebRoot" /></span><span style="color:#333333;">
</attributes>
</project-module></span>
本文介绍了解决因工程转移导致配置文件错误的方法。具体步骤包括检查并修正.mymetadata文件中的webrootdir属性及context-root属性,确保其正确指向项目根目录。
253

被折叠的 条评论
为什么被折叠?



