On my website; users can upload their pictures. I am using tomcat with apache , hibernate, jpa.
I would prefer to keep these images at some location like /var/ImagesUploaded
on my ubuntu box. Using Java I can refer these files in directory /var/ImagesUploaded
using java.io
but how will I show these images on HTML pages to user? On HTML files we need tags like <img src=''>
and this src is relative to the webapp. So, is it that I have to keep the user uploaded images inside my webapp ONLY! Or is there a better solution?