【转】jsp文件输出(@lilybbs blog)
byte[] bytes = downloadApptDAO.getPdfFile(id);
if (bytes == null)
return;
logger.debug("write pdf file to response, size = " + bytes.length)
;
HttpServletResponse response = reqRuntime.getHttpResponse();
response.reset();
response.setContentType("application/pdf");
response.setContentLength(bytes.length);
ServletOutputStream servletOutputStream = response.getOutputStream
();
servletOutputStream.write(bytes);
servletOutputStream.flush();
servletOutputStream.close();
Jun 22 22:24:31 2004
没有评论:
发表评论