读书人

Myeclipse中web项目不能发布到tomcat的

发布时间: 2012-11-08 08:48:11 作者: rapoo

Myeclipse中web项目不能发布到tomcat的解决办法
错误提示:Undefined exploded archive location

解决方法:

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

3、<?xml version="1.0" encoding="UTF-8"?>

<project-module

type="WEB"

name="news"

context-root="/news"

id="myeclipse.1241587095424"

j2ee-spec="1.4"

archive="news.war">

<attributes>

<attribute name="webrootdir" value="/web" />

</attributes>

</project-module>

context-root:发布目录

webrootdir:jsp页面的文件目录

读书人网 >Web前端

热点推荐