aspose file tools*
The moose likes Servlets and the fly likes How to display image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to display image" Watch "How to display image" New topic
Author

How to display image

Prashant Langade
Ranch Hand

Joined: Jul 01, 2009
Posts: 71
Hi

I have a problem while displaying a image in excel sheet.

I can see the image getting displayed when i use


but if i want to access/display that image using the context path like


I am not able to see that image getting displayed.

"WebDnldCtr" is the name of the project(main folder) which has "WebContent" folder which in turn has "Common" folder which contains "conf_en_US.gif" image.

Attaching herewith the snapshot of the image.

Can any one please help me?

Prashant


[Thumbnail for Problem.JPG]

Mani Venkata Kanth
Ranch Hand

Joined: Aug 21, 2006
Posts: 39
FileInputStream looks for exact file location like,

FileInputStream fis=new FileInputStream("C:/RAD7-0-projects/WebDnldCtr/WebDnldCtr/WebContent/Common/conf_en_US.gif")

OR

If your current logic file in WebDnldCtr folder, you can write like

FileInputStream fis=new FileInputStream("./WebDnldCtr/WebContent/Common/conf_en_US.gif")

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to display image