• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

What I have missed?

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hola, I know guys, this is very common question, but there is some thing I don't understand.
The question is how to download a PDF file to client's machine and then open it with Acrobat.
I have read something like: response.setContentType("application/pdf");
I write JSP like this:
<html>
<a href="myfile.pdf">Download</a>
</html>
when visiting: localhost:8080/myapp/download.jsp
it downloads the file and open it with Acrobat.
and when visiting : localhost:8080/myapp/myfile.pdf
it downloads the file and open it with Acrobat.
So, what do you mean to set content type.
(Do you mean, when I pressed the link, a servlet should be called to download the file)??
Please, be patient with me !!
 
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John,
my understanding of how the PDFs open on a client's machine is down to the mime type settings on that individual machine - for example, I can set on my system to always open a PDF by default or prompt me before doing something or bring up the save dialogue by default.
I don't know about the server settings.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic