开发者

Does webapp upgrade using war file overwrite all the content of the previous web app

Here is the scenario:

We are using Linux, Tomcat stack 开发者_运维问答and we deploy our webapp using war files. Basically the deployment process is as follows:

  • git pull latest
  • ant build
  • create war file
  • upload the war file to the server

Now everytime we have to update the code (lets assume that only front end code needs to be deployed) ... we repeat the same steps above ... however we do one additinal thing mentioned below:

There are three directories under

--webapps
   -- myapp
       -- logs
       -- upload
       -- other stuff

Before redeploying the war file we always take a backup of anything under logs and upload (these files are mission critical)

I was wondering if this step is necessary ... in other words:

  • will the content in upload and logs be overwritten by whatever is there in the war file (there is nothing since this is a fresh build)
  • or it will keep the files as it is and do a merge between the existing webapp and stuff coming from the war file

I am hoping that it is the latter

However I have never tried it, I wanted to know if someone already know the answer to this ... I can then test and verify the claim

--Jatin


You'll have to test it to be sure. But you certainly shouldn't store files in this location in the first place. Store them outside the tomcat webapps directory, because this directory is supposed to contain webapps, and nothing else.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜