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

Displaying image in byte array in JSP

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I am facing following problem. I have a image as byte array that i need to display as image, following is the code i wrote in custom tag for the same :

OutputStream o = response.getOutputStream();
o.write(byteImage);
o.flush();
o.close();

In the JSP i am using following code
<img src="displayImage.jsp">

and this displayImage.jsp finally calls the custom tag. However, it seems that img tag is not accepting jsp. My debugger never reaches inside the custom tag implementation.

Also, i have set the MIME-type as "image/jpeg" as required.
Please help
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Tripti, please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.
 
    Bookmark Topic Watch Topic
  • New Topic