War deployment question.......help!
Hi,
Not sure if this is the most appropriate forum to post in but I'll give it a go.......... Please feel free to move this post if you know of a better place.
I have a problem that I do not know the answer to. I am developing a WebApp at the moment and this is being built as a WAR file. I am implementing a piece of software within this WAR that deals with writing files to the filesystem (within the webapp). The files will be located using a look-up table within a database table I have.
Now my problem is as follows:
I use a shared webserver at a hosting provider. When I develop this webapp further and come to deploy the new version by uploading the new war will it autodeploy replacing the old webapp, thus losing any files from the filesystem that were created via the web interface that are not in the new war file? How can I get around this without having to upload each file individually?
Any help would be greatly appreciated!
Thanks,
Andrew
Hi, thanks for the response. Would you recon the following would work?
1) Deploy the webapp at http://www.xyz.com/mywebapp/
2) Create a directory for the files at: http://www.xyz.com/files/
3) Write all files attached to the web forms to the directory in 2, and freely redeploy the war file into the directory at 1.
Any ideas?
Thanks,
Andrew
you want to find another host? why not try to setup your own server and register the domain that you want.. in this case you have full control of the server.. whenever the server crashes its up to you if you will are backing up your files.. some of the hosting solutions don't provide back ups for their client, so whenever their server crashes, the clients are affected.
You can develop further on this by having an user interface which will copy the existing files to a temporary location and then redeploy the new war. The new war file could have another user interface which can read back the data.
Another option would be to have an admin user interface that can download the documents (as a zipped file) and would allow you to upload it back once you have redeployed the new war. This may be slightly more work.
ram.
I suppose the other option in to pop all the files into the database. This would eradicate the problem but would you guys recommend this? 99% of the files will be images, ranging in size from about 50kb to 200kb. I might have about 10,000 over the longer term.
Any pointers greatly received.
Best wishes,
Andrew