tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Urban" <jur...@parkcitysolutions.com>
Subject RE: set content type to text/pdf
Date Fri, 21 Jun 2002 11:52:30 GMT
Alex,

Instead of httpservletresponse.setContentType("text/pdf"); try
httpservletresponse.setContentType("application/pdf");


Jim Urban - jurban@parkcitysolutions.com
Park City Solutions Inc.
Clinical Connectivity Suite Product Manager
Suite 295
500 Park Blvd.
Itasca, IL  60143
Voice:  (630) 250-3045 x106
Fax:  (630) 250-3046

CONFIDENTIALITY NOTICE
This message and any included attachments are from Park City Solutions Inc.
and are intended only for the entity to which it is addressed. The contained
information is confidential and privileged material. If you are not the
intended recipient, you are hereby notified that any use, dissemination, or
copying of this communication is strictly prohibited and may be unlawful. If
you have received this communication in error please notify the sender of
the delivery error by e-mail or call Park City Solutions Inc. corporate
offices at (435) 654-0621

-----Original Message-----
From: Alex [mailto:alexalecu@go.ro]
Sent: Friday, June 21, 2002 2:37 AM
To: tomcat-user@jakarta.apache.org
Subject: 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:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message