I am using href="/jsptreeexample/archive/Year2008/month08/date16/Off-Portal_4w_20-Jan-2009.pdf in jsp. When I am clcking on link its opening that pdf file in browser only. Is there any way to show download option? I saw its happening because of browser settings but I want to show download option without changing my browser settings. Thanks in advance.
Let it point to some servlet which writes the PDF file to the outputstream of the response and, importantingly, sets the content disposition header to 'attachment'. This will cause the webbrowser pop a 'save as' dialogue (the 'download option' as you call yourself).
pawan chopra wrote:I saw its happening because of browser settings but I want to show download option without changing my browser settings.
If you know that it's because of your browser settings, then just change the settings. The other way is to change the content type of the response but since you have a direct link of the file, so that is also not possible I think...
[Beaten to the explanation by Bauke ! Seems like there is a lot of information on you blog Bauke ]