myeclipse 项目类型:java-->web

来源:互联网 发布:阿里云最便宜多少钱 编辑:程序博客网 时间:2024/06/18 00:15

1.修改.project 文件

拷贝web工程的 .project 文件,并修改文件内容,

修改内容:<name>工程名称</name>

 

2.创建.mymetadata 文件

可以先使用myeclipse创建一个web工程,讲其中的.mymetadata文件拷贝到java工程中。

文件作用: 指定web目录,默认指定:WebRoot;

例如:

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

需要修改:  name="star_interface" , context-root="/star_interface"  ,  archive="star_interface.war">

和 <attribute name="webrootdir" value="WebRoot" />