今天项目部署时候出现问题,之后我重新删除了项目,从svn服务器上export一个项目后,从新加载到myeclipse中,可是项目不能部署在tomcat下面。。。
搜索一下,发现是如下解决方案:Tomcat Undefined exploded archive location 项目不能部署
原因:
在工程转移过程中,导致工程的配置文件出错;
解决方法:
1.在工程目录下的.mymetadata文件中可能webrootdir被改无效了(把下面内容拷到你的.mymetadate文件中的相应位置上);或者有可能少了这context-root这个属性;添加上这个属性即可,内容如下:
context-root="/上面的name属性值"
2.关掉Eclipse,再启动Eclipse,接着发布工程,发布成功!
例如:
- <?xml version="1.0" encoding="UTF-8"?>
- <project-module
- type="WEB"
- name="program_name"
- id="myeclipse.1235376033685"
- context-root="/program_name"
- j2ee-spec="1.4"
- archive="program_name.war">
- <attributes>
- <attribute name="webrootdir" value="WebRoot" />
- </attributes>
- </project-module>