I'm writing a website with the function file uploading.
And the Path I save the file is by ServletActionContext.getServletContext().getRealPath("xxxx")
It will save the file to webapps/mywebsit/xxxx
to allow the clients are able to access the data directly by http:// mywebsit/mebsite/xxxxx
the function is ok. But when it comes to redeploy on tomcat here comes the problem.
When I redeploy by war file
.
It seems sorts of remove the all webapps/mywebsit
.
And deploy it with the new war file
.
And the previous upload files are missing.
Is there anyway I can let tomcat don't remove my file while it's redeploying? Or I should store files outside the webapps? But how can I let client be able to reach the file?