Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

setting content type to pdf

843836Aug 1 2003 — edited Aug 4 2003
Hi guys
I want my jsp output in pdf format. I have written following lines at the start of jsp:
response.setContentType("application/pdf");
response.setHeader("content-disposition","attachment;");

But acrobat reader is giving following error:
"Acrobat could not open the file because it is either not a supoorted file type or because the file has been corrupted.(for example it was sent as an email attachment and wont correctly decoded)"


Please advise if anybody knows this issue.
Regards,
SM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 1 2003
Added on Aug 1 2003
12 comments
1,460 views