• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying image which is located on local disk but not on server

 
Vijay maske
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using struts framework. I want to display an image which at a specific location on local drive but
not on server.

Please help me out how to do it.

I tried giving full path of image location in but not working.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65119
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because the browser will use the source of the image element to fetch the image file, it must be able to be served by URL.

If the file itself can't be served for whatever reason, you can write a servlet that reads the file and serves it.

See the Servlet forum as this has been discussed many times.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic