• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

how to display dynamic image in jsp along with other content

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am facing the one problem while displaying dynamic image along with other content.
I am able to create the image from the blob but I don�t know where to keep this image in the server or else where so that I can give the link in JSP to this image path. In the jsp page along with this image I need to display some report. If image is the only one to display I can do it. But I am not able to display along with some other content.
Please help If some body knows the solution.

Regards,
GTR
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One way to do it would be to create an action such as "image". Then, in your Image action class, get the BLOB, convert it to stream of data, and send it to the output stream of the HTTPServletResponse object.

Then in your jsp, you can code <img scr="image.do?imageName=image1">

There's an example of this in the struts-examples.war that comes with the Struts download. Check out the class: org.apache.struts.webapp.exercies.ImageAction
[ January 12, 2006: Message edited by: Merrill Higginson ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic