This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Displaying image which is located on local disk but not on server Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "Displaying image which is located on local disk but not on server" Watch "Displaying image which is located on local disk but not on server" New topic
Author

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

Vijay maske
Greenhorn

Joined: Oct 29, 2010
Posts: 2
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

Joined: Jan 10, 2002
Posts: 56529
    
  14

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Displaying image which is located on local disk but not on server
 
Similar Threads
Storing InputStream object to Application scope in servlet and retrieving
image height&width needed
How do I insert a BLOB from a servlet
Splash Screen doesnot pops up while launching the jnlp
How do I insert an image into a database from a servlet?