Summary :: Why is my browser not showing my constructed image Retrieved image from DB , constructed using ImageIcon
Details My Servlet code is retrieving image using resultset.getBlob() method and then constructs an ImageIcon from it using the following code. But when i display it using <img src=imageicon> html tag the image doesnt get displayed and the browser shows an empty placeholder instead of image.? Please help !!! (P.s: rest of the printed parameters show correct values confirming an image is constructed correctly , but i dont know how to display it in the browser.) while(rs.next()){ System.out.println("hi there"); s=rs.getString("filename"); image=rs.getBlob(3); System.out.println("filename "+s); System.out.println("image"+image); iLength = (int)image.length(); System.out.println("ilength="+iLength); ii = new ImageIcon(image.getBytes( 1, iLength )); System.out.println("sucessflag"); out.println("here's the icon"); out.println(""); } ///output on the jboss application server console for the System.out.println() statements 12:51:34,504 INFO [STDOUT] hi there 12:51:34,504 INFO [STDOUT] filename jchatbox.gif 12:51:34,504 INFO [STDOUT] [EMAIL PROTECTED] 12:51:34,504 INFO [STDOUT] ilength=5779 12:51:34,624 INFO [STDOUT] sucessflag View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3852991#3852991 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852991 ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user