'open with' window poping up even though MIME type is set
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sudhakar_k
Posted On:   Tuesday, February 10, 2004 09:20 PM

I have a servlet that generates pdf content. In the initData method, I use: httpservletresponse.setContentType("application/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 FrontController[1], because my servlet is called FrontController), and then i choose acrobat reader. What should I do so that my browser automatically opens the pdf content generated by the servlet ?    More>>

I have a servlet that generates pdf content.
In the initData method, I use:
httpservletresponse.setContentType("application/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 FrontController[1],
because my servlet is called FrontController), and then i choose acrobat
reader.

What should I do so that my browser automatically opens the pdf content generated
by the servlet ?

   <<Less

Re: 'open with' window poping up even though MIME type is set

Posted By:   mohammad_rizwan  
Posted On:   Friday, February 13, 2004 07:51 AM

Hi sudhakar, I am also facing the same problem in my screen.


even when i am setting the content type as image/jpg, still it asks a popup, some times it opens in word document as binary data, sometimes it opend in internet explorer. If u solve that problem please let me know also. Even i will let u know if I solve that.

Solution u can mail to my personal address also if possible
rizzu_md@yahoo.com
Regards,
Rizwan.
About | Sitemap | Contact