出處:http://queue19.javaeye.com/blog/346850
原因:
在工程轉移過程中,導致工程的配置文件出錯
;
解決方法:
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
>