You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by he...@dnb.no on 2002/06/21 09:35:17 UTC

SV: set content type to text/pdf

Hi

Install Acrobat Reader - That will do the trick. Currently you have no
association with the .pdf extension.

Hermod

-----Opprinnelig melding-----
Fra: Alex [mailto:alexalecu@go.ro]
Sendt: 21. juni 2002 09:37
Til: tomcat-user@jakarta.apache.org
Emne: set content type to text/pdf


I have a servlet that generates pdf content.
In the initData method, I use:
  httpservletresponse.setContentType("text/pdf");

When i access the servlet from the browser (i'm using win2k), it opens
a small window asking me what to do with the file (open, save,
cancel..), and then, when i choose "open", it asks me which
application should i use to open that file (it is called Tiparire[1],
because my servlet is called Tiparire), and then i choose acrobat
reader.
What can i do so my browser automatically opens the pdf content
generated
by the servlet ?
Thanks in advance...

Alex.



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that DnB cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>