|
My question is I know that a server application can access the data stored at server but cannot access teh data stored at client machine as this is a security issue and Browsers not allow this. But in case of localHost (when my local pc is acting as a server) I should be able to access the files from my PC(the local PC on which the application is running). But that is not happening. Why i m not able to access a simple image file form my local C: drive by localhost. The URL i used was file:///c:/image.png but if i store this image any where under home directory of tomcat i m able to access it. WHY ?? I m using it as <'img src="file:///c:/image.png> Thanks for any considerations.. |
|
the main problem was this, I was doing 'file:///c:/image.png' in browser which is not correct. We cannot access the data from the local machine anyway through browser or javascript. We have to access the data from server side ie; either from servlet or JSP which runs on server side and not from browser/javascript which run on client's machine. |
What URL do you use to access your web page?
Thanks Nikki for ur time and consideration but the problem is solved.
I'm curious as to how the problem was solved. Care to share your answer?