我需要返回一个编码的 PDF,但我需要 MIME 类型来执行它。我应该用什么?
谢谢!
ExternalContext ec = fc.getExternalContext();
ec.responseReset();
ec.setResponseContentType("??")
ec.setResponseHeader("Content-Disposition", "attachment; filename=\"" + this.fileName + ".pdf" + "\"");
OutputStream output = ec.getResponseOutputStream();
output.write(encrypted);
output.flush();
output.close();
fc.responseComplete();