Yesterday, after a few good advices there from fop users I successfuly used
this code to show pdf content in browser. It works in my JDeveloper 9i.
File inputFile = new File(pdfFile);
FileReader fr = new FileReader(inputFile);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int ch;
while((ch = fr.read()) != -1) {
baos.write(ch);
}
byte[] content = baos.toByteArray();
response.setContentType("application/pdf");
response.setContentLength(content.length);
response.getOutputStream().write(content);
response.getOutputStream().flush();
---
But when I deploy my application to Tomcat (4.0.3, on same PC as browser),
browser shows dialog, asking whether to open or save the data. I can only
save it, open doesn't work. I use IE 6.0. I tried both GET and POST methods
with the same result.
Any ideas ?