A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide 1Z0-808
this week in the
How to display image
Joined: Jul 01, 2009
Jun 22, 2011 05:22:45
I have a problem while displaying a
I can see the image getting displayed when i use
FileInputStream fis=new FileInputStream("C:/RAD7-0-projects/WebDnldCtr/WebDnldCtr/WebContent/Common/conf_en_US.gif")
but if i want to access/display that image using the context path like
FileInputStream fis=new FileInputStream("WebDnldCtr/WebContent/Common/conf_en_US.gif");
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?
Mani Venkata Kanth
Joined: Aug 21, 2006
Jun 22, 2011 05:54:18
looks for exact file location like,
If your current logic file in WebDnldCtr folder, you can write like
I agree. Here's the link:
subject: How to display image
Serlvet to display image - how to prevent client from "Save As Image" ?
Error in displaying image using stream Result
Inserting an Image into the DataBase :
File Path in Mac and Windows
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015