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!

Opening a PDF through a servlet

843833Oct 15 2003 — edited Oct 16 2003
I have been trying to open a PDF document using a servlet for quite a while now and I am making no progress.

I have gotten the file to pass through to the browser at least 3 different ways, however, when I access the servlet using IE I get an error. The interesting thing is that when I refresh the page, the PDF file opens just fine.

Is there any trick to doing this? I can use the redirect directly to the PDF file:
res.sendRedirect("http://localhost:9080/test.pdf");
The problem there is that I need the users to bookmark the servlet, not the PDF. In fact I do not even want the user to know where the PDF is.

Any help is greatly appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2003
Added on Oct 15 2003
1 comment
426 views