Hello All,
My application is followed J2ee architecture. It contains Java and jsp codes.
This application generates some reports in pdf format. I am using Weblogic 10.3 and jdk 6.
While I want to open the pdf in IE 6 with service pack 2 , the pdf not showing properly. It comes in byte code. It is not showing any exception also. I have Adobe reader 9 in my m/c.
Can any one suggest me how can I rectify this error from my code.
Thanks in advance.
Obviously you are doing something wrong in your application code. However unfortunately you have not provided us with sufficient information to enable us to help you.
Thanks for asking...
I have used the following code in my jsp code.
[LEFT]String fileName = "abc.pdf";
response.setContentType("application/pdf");[/LEFT]
response.setHeader( "Content-Disposition", "inline; filename=\"" + fileName + "\"" );
[LEFT][/LEFT]
[LEFT]
application.log("write baos to reponse ...");
baos.writeTo(response.getOutputStream());[/LEFT]
baos.close();
Please let me know if you need any further information....
Thanks in advance.
Just because you set the MIME type to "application/pdf" does not mean that the output is converted to pdf. Where are you doing the actual pdf transformation?