Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display image in jsp

 
ramesh poorella
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai..

my web application in D folder.... but image is in another folder..
how can i retrive and dispaly that image in my Jsp?

thanks
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP is not responsible for displaying an image. JSP is responsible for writing a HTML page to the client browser.

Normal HTML rules apply for getting an image displayed on the page. If you can write a static HTML page that displays that image, then you can write that page with JSP>

Bill
 
ramesh poorella
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in html can we retrive image from another folder using IMG tag?
 
akhter wahab
Ranch Hand
Posts: 151
Java MyEclipse IDE Python
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ramesh poorella wrote:in html can we retrive image from another folder using IMG tag?


yes you can easily by giving appropriate path
 
ramesh poorella
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry i am not getting image with another folder. in same folder i am getting.............

please give me sample code for that...
 
akhter wahab
Ranch Hand
Posts: 151
Java MyEclipse IDE Python
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ramesh poorella wrote:sorry i am not getting image with another folder. in same folder i am getting.............

please give me sample code for that...


can you provide your code and tell us where folder exist in which image is
 
ramesh poorella
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is my code:




The bar.Jpeg image is in same my application folder..... but i need to retrive and display i mage from separate folder or drive....

please help me
 
Amit Ghorpade
Bartender
Posts: 2851
10
Fedora Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at

How can that render an image? You need to fix the URL of the image.
Well as you can see how UseCodeTags helps a lot in viewing as well as understanding the code. I've added them for you.
 
Ashutosh Limaye
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Change the extention to [img.jpg] .
JPEG is the format type jpg is the file extention.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic