MyEclipse中添加web项目到tomcat
时间:2014-05-06 22:51:13
收藏:0
阅读:495
如果导入不是在MyEclipse下建立的web项目,想添加到tomcat中时,会显示“No projects are available for deployment to this server...............”。其实可以简单地修改两个配置文件:
.project文件:在natures节点中添加webnature
<natures>
<nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
.mymetadata文件,添加context-root和webrootdir
<?xml version="1.0" encoding="UTF-8"?>
<project-module
type="WEB"
name="DynaTable"
id="myeclipse.1263372301465"
context-root="/DynaTable"
j2ee-spec="1.4"
archive="DynaTable.war">
<attributes>
<attribute name="webrootdir" value="war" />
</attributes>
</project-module>
评论(0)