This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
    Bookmark Topic Watch Topic
  • New Topic

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
 
Author and ninkuma
Marshal
Posts: 66681
167
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.
 
Well don't expect me to do the dishes! This ad has been cleaned for your convenience:
free 1 hour java lesson
https://coderanch.com/t/695988/free-hour-java-lesson
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!