In my web application one of my pages is uploading a photo to the path
/usr/local/rac/picture-name-goes-here
The photo is uploading fine, but I need to acces
src="/usr/local/agent/photo-name-here.jpg" <- this URL is a local address in your server, to show up your images you have to set a valid HTTP address like:
http://www.yourdomain.com/images/photo-name-here.jpg
To accomplish that you will need to upload the foto to a localpath that is inside in your www root folder.
If your webapp is installed in
/home/apache/www/website/ you will upload your images to a folder like:
/home/apache/www/website/images/ and then your HTTP address will be
http://www.yourdomain.com/images/photo-name-here.jpgI got a little confuse with your two paths in /usr/ and C:\Tomcat
I encourage you to put the upload localpath folder parametrized, so you will be only modifying the config file instead of every function or method that access to that local path.