Click here to Skip to main content
15,893,663 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Im using Java Web Development,
I want to display an image in my file computer(file:///home/icotp/Desktop/img.gif for ubuntu) but the running system is (http://localhost:8080/file).
Can I make http://localhost:8080 to file:///...
Posted

You cannot access files outside of your root directory. Move the image file to the root directory of your server and point to it from there.
 
Share this answer
 
If its impossible to change my root derictory...
How can I display an image that is isn't in the Server (in the file system).
 
Share this answer
 
Either move the image file to your server directory (if you're using linux it should be something like var/www) or point to a web url (htt://something.com/image.jpg)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900