aspose file tools
The moose likes JSP and the fly likes Mime type in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Mime type in JSP" Watch "Mime type in JSP" New topic
Author

Mime type in JSP

tripti pandey
Greenhorn

Joined: Mar 09, 2006
Posts: 5
i am trying to display a image obtained in byte array through jsp. Following is the code that i am using :
<%
response.setContentType("image/jpeg");
OutputStream o=response.getOutputStream();
byte[] byteImage;
byteImage = request.getParameter("byteImage");
o.write(byteImage);
o.flush();
o.close();
%>

This code works perfectly fine and i am able to see the jpeg image, however problem arises when i putting this jsp in tile-def.xml. Byte dump is being displayed in this case instead of image.
Please help what the problem can be.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Mime type in JSP
 
Similar Threads
Displaying image in byte array in JSP
How to display multiple images in the jsp
Displaying image on jsp
JPEG Image Upload
displaying byte array as image in IE