Hi
Install Acrobat Reader - That will do the trick. Currently you have no
association with the .pdf extension.
Hermod
-Opprinnelig melding-
Fra: Alex [mailto:[EMAIL PROTECTED]]
Sendt: 21. juni 2002 09:37
Til: [EMAIL PROTECTED]
Emne: set content type to text/pdf
I have a servlet
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
right. Mozilla and other such browsers listen to the mime type, but IE
(living in a microsoft world where everything is done via file
extensions) is famous for relying on the extension rather than the mime
type.
Liam Morley
Dennis van den Berg wrote:
Hi,
I think when you make the request
1.1). The acrobat reader sometimes
uses this. (Have a look at the source for the
servlet that implements the fileserving for tomcat)
-Ursprüngliche Nachricht-
Von: Alex [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 21. Juni 2002 09:37
An: [EMAIL PROTECTED]
Betreff: set content type
Betreff: AW: set content type to text/pdf
The safest way to convince IE to open PDF is to set the
content type to load the file from a url that has the
extension .pdf.
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
]
Betreff: set content type to text/pdf
What can i do so my browser automatically opens the pdf
content generated
by the servlet ?
Thanks in advance...
RE --
RE To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
RE For additional commands, e-mail: mailto:[EMAIL PROTECTED]
--
To unsubscribe, e
the fileserving for tomcat)
-Ursprüngliche Nachricht-
Von: Alex [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 21. Juni 2002 09:37
An: [EMAIL PROTECTED]
Betreff: set content type to text/pdf
What can i do so my browser automatically opens the pdf
content generated
by the servlet ?
Thanks
You could also map your servlet to the pattern *.pdf
Dennis.
-Original Message-
From: Liam Morley [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 21 juni 2002 9:57
To: Tomcat Users List
Subject: Re: AW: set content type to text/pdf
I'm sure there's a better way, but in case there's
/servlet-name
url-pattern*.pdf/url-pattern
/servlet-mapping
-Ursprüngliche Nachricht-
Von: Alex [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 21. Juni 2002 09:57
An: Tomcat Users List
Betreff: Re: AW: set content type to text/pdf
I can't point my browser to a location that ends
Hello Ralph,
I've modified web.xml from ROOT\WEB-INF, and i've added
something like this:
servlet-mapping
servlet-nameTiparire/servlet-name
url-patternTiparire.pdf/url-pattern
/servlet-mapping
My servlet is called Tiparire.class and is
: AW: set content type to text/pdf
But, when i start tomcat, it says:
ERROR reading java.io.ByteArrayInputStream@4e280c
At Line 11 /web-app/servlet-mapping/
What is wrong ?
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail
You might need to declare the servlet from within a servlet element like
this as well:
|servlet-mapping
servlet-nameTiparire/servlet-name
url-patternTiparire.pdf/url-pattern
/servlet-mapping
servlet
servlet-nameTiparire/servlet-name
servlet-classTiparire/servlet-class
/servlet
|
Hello Liam,
I've inserted into the web.xml file these lines:
servlet-mapping
servlet-nameTiparire/servlet-name
url-patternTiparire.pdf/url-pattern
/servlet-mapping
servlet
servlet-nameTiparire/servlet-name
Freitag, 21. Juni 2002 11:10 schrieb Alex:
Tiparire.class is not part of any package.
Tomcat starts ok, but, when i'm trying to access the location
servlet/Tiparire.pdf, it says:
Hi,
cause your using a servlet Mapping and your servlet is in the ROOT
Context you have to
-Original Message-
From: Alex [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 21, 2002 2:37 AM
To: [EMAIL PROTECTED]
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
Digging back into the dark cavern that is trying to get IE to work with
a spec complying application
(from which I have emerged and no longer care about)...
I believe you might be able to go
http://server:8080/servlet/pdfservlet?thisisnotanarg.pdf
This may confuse IE into giving you
16 matches
Mail list logo