I have made a folder outside the webcontent to save the uploaded images by user. Initially i tried to access those files directly by passing the location in the "src" tag, but unable to fetch it. After researching i found that i have to set the path using in "conf/server.xml" file inside the tag. Although i have made all these changes i am unable to access the file.
1)My Tomcat is Installed at E:\my work\Tomcat
2)I am having my webroot at E:\my work\Project
3)Image folder is at E:\my work\images
Path i am setting in "conf\server.xml" is
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context docBase="/my work/images/" path="/images" />
</Host>
But still when i tried to access the file using the following url
http://localhost:8080/images/paper.jpg
I am unable to fetch it and getting the "HTTP Status 404" and request resource not found error.
Please help me in this i am using the Blob field to store the image and storing the image inside this folder when user request for a particuler image. I don't want to use specific servlet to write the image into the browser rather i want direct access to the user.
Please help me to solve this problem. Thanks Regard