assuming i have read an image from MS SQL w/ image datatype field.
save that to a Byte[] or maybe ByteArrayOutputStream type.
let's say i saved it to a request:
request.setAttribute("datastream",readdata);
my question is how can i display this data as an image from a
jsp.
i have this jsp but is seem's id doesn't work.
will anyone help me. thanks a lot
<%@ page language="java" %>
<%@ page buffer="64kb" %>
<%
response.setContentType((
String)request.getAttribute("contentType"));
//response.setHeader("Content-Type",(String)request.getAttribute("contentType"));
//response.addHeader("Content-Disposition","filename=image.jpg");
%>
<%= request.getAttribute("datastream") %>