I have a folder : Resources where all my images are, but also the images my Users added. Everytime I deploy a new .war file this gets overwritten, forcing my Users to upload their pictures again. Is there any way of solving this?
More specifically, don't store the images that are coming from your user in a directory that gets overwritten during a deployment. Why would you?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Tristan Van Poucke
Joined: Jun 30, 2008
But wherever i put the folder in my web folder, its being included in the build map. Wich tells me it will be overwritten on deploy. And if I don't put it in my web folder I can't seem to reach the images from a page.
So what i understand from this, is that all I have to do is: - Create a folder on my server f.e. UserResources - Get all the images added by users from there directly using the full URL f.e. http://MyServer:8080/UserResources - Do not add this map in my war file. And this problem should be solved right? [ October 01, 2008: Message edited by: Tristan Van Poucke ]
Tristan, if you were responding to my suggestion, then the tasks would be:
1) Create a directory in the host, say /opt/image 2) Configure the app server such that the context /UserResources, accessible via the URL http://MyHost:8080/UserResources, maps to the directory /opt/image 3) Ignore the /opt/image directory when creating the WAR
I prefer the term 'host' because it implies the physical (or virtual) machine on which the application server is running. I have seen the term 'server' used to mean the host in some cases and the application server in others, so the term 'server' tends to be ambiguous, which is not good when discussion precise configuration.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com