在哪里可以放置上传文件夹,以便在Tomcat中部署/取消部署站点时该文件夹不会受到影响 [英] Where can I put an uploading folder so that when I deploy/undeploy the site in Tomcat that folder won't be affected

查看:84
本文介绍了在哪里可以放置上传文件夹,以便在Tomcat中部署/取消部署站点时该文件夹不会受到影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在JSP(在线商店)中建立了一个站点.用户已登录并使用我制作的控制面板上传了一些照片.我现在想对该站点进行一些修改,但是如果我取消部署它,Tomcat将删除这些照片.

I've made a site in JSP (online shop). An user has logged in and uploaded some photos with a control panel that i've made. I want now to make some modifications to that site, but if I undeploy it ... Tomcat will delete the photos.

如何下​​载网站或照片文件夹?
我可以在哪里放置photos文件夹,以便在我部署/取消部署网站时,photos文件夹不会受到影响?

How can I download the site or photos folder?
Where can I put photos folder so that when I deploy/undeploy the site, photos folder won't be affected?

推荐答案

在其中制作属性文件

[Windows]

[Windows]

archive_folder=c:\archive\

[Linux]

archive_folder = /opt/archive/

从该属性文件中读取文件夹路径,并将照片存储在该文件中.由于该文件夹位于应用程序外部,因此不会被删除.

Read the folder path from that properties file and store your photos there. Since the folder is located outside of the application, it won't get deleted.

这篇关于在哪里可以放置上传文件夹,以便在Tomcat中部署/取消部署站点时该文件夹不会受到影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆