File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Display image in Jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Display image in Jsp page" Watch "Display image in Jsp page" New topic

Display image in Jsp page

Sivakumar Janardhanan
Ranch Hand

Joined: Dec 11, 2008
Posts: 30
Hello All,

I want to show one image in jsp page. i have stored that image in my Local Disk "D Drive".

for e.g

(Actually JSP will call all the stuff from the server side even an image)

Please help me how to show the local disk image file in jsp page

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
The image must be in a publicly accessible directory; a path like "D:\..." will not work. Also note that "imgsrc" is not a valid HTML tag name.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

I see no JSP dimension to this question at all. Moved to the HTML forum.

[Asking smart questions] [About Bear] [Books by Bear]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Browser security does not let you view any files that are located on the users computer. In the past this was not true, but in today's day in age with security it is.

I agree. Here's the link:
subject: Display image in Jsp page
jQuery in Action, 3rd edition