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.