Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 8th, 2007, 09:40 AM
Registered User
 
Join Date: Aug 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default display byte array of jpeg in jsp

Hi All,please give me your solution, thanks.

i have a dvo where it consist of byte array of a picture. while trying to display on jsp ,i could not get the picture.
here is the code i tried

 response.setContentType("image/jpeg");
 OutputStream outSt = response.getOutputStream();
 outSt.write(loDocumentDVO.getFileContents());
  // where loDocumentDVO.getFileContents() consist of byte array
 outSt.flush();
 outSt.close();
 
Old September 4th, 2007, 06:53 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

For people who are looking for solutions of this kind
http://forum.java.sun.com/thread.jspa?threadID=5204277


- Rakesh





Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing byte array into image file yukijocelyn C# 2005 1 August 6th, 2008 03:45 PM
display byte array of pdf in jsp mahendra.w JSP Basics 2 September 23rd, 2007 11:23 PM
How to display list of byte[] image in jsp sheetm JSP Basics 0 September 13th, 2007 05:42 AM
Converting a String to a Byte array BrianWren Pro Visual Basic 2005 2 February 20th, 2007 11:03 PM
Trap error on Jpeg Image - unsafe array echovue Classic ASP Professional 2 April 24th, 2006 11:47 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.