我想将一个war文件部署到MyEclipse的tomcat中。我尝试Add Deployment
到tomcat,但它只能部署MyEclipse的项目。然后我尝试将war文件导入到项目中,但MyEclipse导入中没有war文件选项。
如何在MyEclipse tomcat服务器中运行war文件?
答案 0 :(得分:1)
如果你想在tomcat eclipse中运行war文件,你只需将你的war文件放到tomcat webapps文件夹中。
请按照以下步骤操作:
1) Stop Tomcat.
2) Delete existing deployment. If you have previously deployed "foo.war" in TOMCAT_HOME/webapps, then it has been unpacked into webapps/foo/... You must delete this directory and all its contents. On Unix, this can be done with
rm -r $TOMCAT_HOME/webapps/foo
3) Copy WAR file to TOMCAT_HOME/webapps/.
4) Start Tomcat.
有关此类问题的更多文档here