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:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Displaying image in byte array in JSP  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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
 
Marshal
Posts: 67163
169
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
Boost this thread!