hi i have extracted the image from the repository ( as Inputstram) in a servlet and now i need to pass it to the JSP and make it display but with some other text fields as well . but when i use my below code it displays the object but not the text... and also it throws a exception as well ( when 'forward' of dispatcher is called) servlet code ---------- InputStream pic = null; try { OutputStream os = null; response.setContentType("image/jpeg"); try { pic = profileImgManageBean.viewImage("fileName"); int read = 0; byte[] bytes = new byte[1024]; os = response.getOutputStream(); while ((read = pic.read(bytes)) != -1) { os.write(bytes, 0, read); } } catch (ImageNotFoundException imE) { } RequestDispatcher view = request.getRequestDispatcher("view.jsp"); view.forward(request, response); os.close(); } catch (Exception ex) { Logger.getLogger(ViewImage.class.getName()).log(Level.SEVERE, null, ex); } finally { pic.close(); JSP code ------- <%@page contentType="text/html" pageEncoding="UTF-8"%> User Prifile Picture

Profile Picture

<%=response.encodeURL(request.getContextPath())% BORDER=0 WIDTH=16 HEIGHT=16> can anyone say the proper way to diaplay the image( also i need to know for other documents as well e. g pdf..) please help..... -- View this message in context: http://www.nabble.com/displaying-the-image-using-JSP-tp20766990p20766990.html Sent from the Jackrabbit - Users mailing list archive at Nabble.com.