<%@ page contentType="text/html;charset=gbk" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.tool.*" %>
<%@ page import="net.sz600.database.*" %>
<%
    String id = SzConvert.toZeroStr(request.getParameter("id"));
	SzDataReader dataReader = new SzDataReader();
	ResultSet rs = dataReader.readInfo("SELECT MarkBody,MarkType FROM Signature where SignatureID=" + id);
 	String mFileType;
 	byte[] mFileBody;
	//response.setContentType("image/gif"); //This line is very important
	ServletOutputStream so = response.getOutputStream();
	if (rs.next()) {
      mFileBody=rs.getBytes("MarkBody");
      mFileType=rs.getString("MarkType");	
	  so.write(mFileBody);
	  so.flush();
	}
	so.close();	
	dataReader.closeAll();
	
	response.flushBuffer(); 
	out.clear(); 
	out = pageContext.pushBody(); 
%>