[英]How to redeploy war file in tomcat without deleting/undeploy the old application?
I already have a working Tomcat Server with Web Manager where I can deploy my WAR file. 我已经有一个带有Web Manager的Tomcat服务器,我可以部署我的WAR文件。
The WAR file contains my web application and this web application has a feature where user can upload images into one of it's folder. WAR文件包含我的Web应用程序,此Web应用程序具有一个功能,用户可以将图像上载到其中一个文件夹中。
The problem is when I need to update the web application using a new WAR file. 问题是当我需要使用新的WAR文件更新Web应用程序时。
When I upload it through Tomcat manager. 当我通过Tomcat管理器上传它。 It says WAR file already exist.
它说WAR文件已经存在。 I have to UNDEPLOY it first before I can upload the updated WAR.
在我上传更新的WAR之前,我必须首先取消它。
I don't want to do this UNDEPLOY process because it will delete the application along with all the images that user already uploaded. 我不想执行此UNDEPLOY过程,因为它将删除应用程序以及用户已上载的所有图像。
So, how can I update my web application without deleting those uploaded files? 那么,如何在不删除上传文件的情况下更新我的Web应用程序? Or maybe I was using the wrong approach with my application?
或者我的应用程序使用了错误的方法?
Since I need a quick fix. 因为我需要快速修复。 Here is what I did to make it work:
这是我做的工作:
So when I want to deploy a new WAR. 所以,当我想部署一个新的WAR时。 I put the new WAR file on step no.2 and then execute the shell script.
我将新的WAR文件放在第2步,然后执行shell脚本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.