> We have a servlet that sends back PDFs that are stored in a database.
> Everything seems to work great but the one oddity/issue that I would like to
> solve if possible is. When someone wants to save the PDF, instead of
> viewing, it wants to save the PDF as the name of the servlet. I understand
> why this is the case, but I wonder if there is anything, perhaps in the
> content header, that I could set the actual name of the file. 
> 
> Any suggestions would be greatly appreciated.

Most browsers only consider the URL when determining the name to save as.
I do not know of any specific header to modify this. To solve the problem
in previous systems, I designed the servlet to include the "name.pdf" at
the end of the URL, which I used as the servlet's PathInfo. This certainly
solves the problem.

tim.


Reply via email to