---
title: "Undefined exploded archive location"
author: "编程足球"
date: "2012-08-22T17:14:21Z"
tags: []
categories: ["Web前端"]
slug: "undefined-exploded-archive-location"
draft: false
lastmod: "2012-08-22T17:16:11Z"
id: 1654716
url: "https://lingf.iteye.com/blog/1654716"
---

1. 用Myeclipse部署web系统wlms时候报如下错误:
   
![](http://dl.iteye.com/upload/attachment/0072/7405/312c6c2d-8103-3a91-b035-761db0241eaa.jpg)

则很有可能是你自己项目环境信息有问题，修改下就可以了。
打开项目目录: .mymetadata  文件

```xml

<?xml version="1.0" encoding="UTF-8"?>
<project-module
  type="WEB"
  name="wlms"
  id="myeclipse.1345519075437"
  j2ee-spec="1.4"
  archive="wlms.war">
  <attributes>
    <attribute name="webrootdir" value="/web" />
  </attributes>
</project-module>

```


插入context-root 的值就可以， 值就是上面name的值

```xml

context-root="/wlms"

```



```xml

<?xml version="1.0" encoding="UTF-8"?>
<project-module
  type="WEB"
  name="wlms"
  id="myeclipse.1345519075437"
  context-root="/wlms"
  j2ee-spec="1.4"
  archive="wlms.war">
  <attributes>
    <attribute name="webrootdir" value="/web" />
  </attributes>
</project-module>

```


在重新打开Myeclipse，就可以部署项目。
其实<span style="color:red">context-root</span>的值可以在Myeclipse中直接配置
1. 右击项目，选择Properties
2. 
![](http://dl.iteye.com/upload/attachment/0072/7422/a4d8d45c-d8c6-317b-848d-628d54c93f5a.jpg)
把值设置为项目名称就可以了



<span style="color:red">记得重启Myeclipse</span>