• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

read and display an Image  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hay Everyone,

I would like to read an image file (jpg, gif, etc) from disk and make the image available to a jsp for display. I know the location and name of the image file because I have stored the file name in an EJB when I wrote the image file to disk after the user uploaded the file via a jsp. The image is assocaited with a piece of equipment. Later, when the user is viewing the equipment I have the image name hyerlinked. From this point I have not figured out how to re-produce the image in a jsp on the click.

How does one do that?

TIA for all help!
 
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps a hyperlink to the image?


[ December 27, 2004: Message edited by: Joel McNary ]
 
Lee Grimes
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A hyper link will not work because the source of the file is not known until run-time when the user selects aa item. I know what item the user is working with when they click on an image link. I do not know how to read the image file and how to get it into the jsp space...
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it's a JSP, you can dynamically put the path to the image into the JSP:

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!