• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Display image in jsp

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in html can we retrive image from another folder using IMG tag?
 
Ranch Hand
Posts: 151
MyEclipse IDE Python Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
MyEclipse IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Change the extention to [img.jpg] .
JPEG is the format type jpg is the file extention.
 
This guy is skipping without a rope. At least, that's what this tiny ad said:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic