I am running tomcat and I have some custom images which when I store on my C drive do not show up.If I move them to webapp root foder, they r fine but I do not want these images to end up in the war file.As I am using Windows symbolic link is not an option. Any idea as to how I can make the images show up without storing in the webapp root?
+1
A:
The web server will need the images to be stored in a web folder (root or virtual directory) to interperet the URL to a local file location.
If on the other hand you are referencing your images using file:// then the web server is not serving the files, the OS is, and will only work for local users that have access to the files.
Ady
2008-10-27 04:01:31
A:
Well, you can also manage them by your app - that is when you get the request for the image, your application reads it from the disk, sets proper Content-type and outputs the image.
That is not recommended tho. Better leave this job to the web server.
kender
2008-10-27 05:59:03