java - MyEclipse - 将 war 文件部署到 tomcat

标签 java tomcat web war myeclipse

我想将一个war 文件部署到MyEclipse 的tomcat 中。我试过Add Deployment to tomcat 但它只能部署MyEclipse 的项目。然后我尝试将war文件导入到项目中,但是在MyEclipse导入中没有war文件选项。

如何在 MyEclipse tomcat 服务器上运行一个 war 文件?

最佳答案

如果你想在 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

关于java - MyEclipse - 将 war 文件部署到 tomcat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27630902/

相关文章:

java - 我们的 war/WEB-INF 文件夹中资源的文件路径?

scala - Tomcat 中有很多 Akka 线程

java - SetCharacterEncodingFilter 仅适用于 GET 请求

Javascript/Html..按钮进入当前选项卡而不是新选项卡

ios - 在网络上显示 iOS 表情符号 unicode 字符

java - 为什么HttpServletRequest中的RequestBody是一个InputStream?

Java 相当于 Python 中的函数映射

java - 使用Matlab登录网页下载文件

java - 用于 RESTful Web 服务的 JAX-WS 与 JAX-RS

java - Eclipse 和 Tomcat 突然出错