Tomcat Undefined exploded archive location 项目不能部署

来源:互联网 发布:淘宝什么时候搞大打折 编辑:程序博客网 时间:2024/06/02 04:15

出处:http://queue19.javaeye.com/blog/346850

 

原因:
          在工程转移过程中,导致工程的配置文件出错


解决方法:
          1.在工程目录下的.mymetadata文件中可能webrootdir被改无效了(把下面内容拷到你的.mymetadate文件中的相应位置上);或者有可能少了这context-root这个属性;添加上这个属性即可,内容如下:
            context-root="/上面的name属性值"
         
2.关掉Eclipse,再启动Eclipse,接着发布工程,发布成功!

例如:

 

Xml代码
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <project-module  
  3.   type="WEB"  
  4.   name="program_name"  
  5.   id="myeclipse.1235376033685"  
  6.   context-root="/program_name"  
  7.   j2ee-spec="1.4"  
  8.   archive="program_name.war">  
  9.   <attributes>  
  10.     <attribute name="webrootdir" value="WebRoot" />  
  11.   </attributes>  
  12. </project-module> 
原创粉丝点击