"Katiyar, Bhawana" <[EMAIL PROTECTED]> wrote: > I am using IE 5.5 SP2. My request for a PDF document is being sent twice.
This is a FAQ, you'll find answers in the archives. A summary: First, it is important that IEx takes clues how to handle the content from the URL even before it requests the content. Unfortunately the detailed behaviour varies not only between major versions but also between individual builds of which there are zillions floating around. A good approach is to use a simple URL ending in .pdf, for example http://my.server/some/path/to/document.pdf It should be possible to configure any servlet to react on such URLs properly. If for some reason parameters has to be added, the complete URL should not end with a string that could be a registered file extension, or it should end in .pdf Do not use http://my.server/generator.pdf?image=stuff.jpg If necessary, add a dummy parameter at the end http://my.server/generator.pdf?image=stuff.jpg&dummy=.pdf If the base URL without parameters must not end in .pdf, avoid other registered extensions. The following seems to confuse practically all IEx versions because .xml is registered by some application (usually IEx itself) to be handled, causing IEx to request the content at least twice http://my.server/generator.xml?image=stuff.jpg Whether .asp work may depend on whether .asp is registered locally, it may work on some clients as expected and differently on machines which have IIS installed. Adding a dummy parameter may help: http://my.server/generator.xml?dummy=.pdf but it has been reported some builds of IEx are still confused. The following may be handled more consistently: http://my.server/generator?dummy=.pdf Note that the base URl does not have any extension. Furthermore, it is important to add a proper content-type header response.setContentType("application/pdf"); as all servlet examples do. A content-disposition may also be of some use, especially if it expected that the client wants to store the generated PDF instead if viewing it: response.addHeader("Content-Disposition","inline;filename=report.pdf"); or response.setHeader("Content-Disposition","attachment;filename=report.pdf"); Fiddling with the cache settings and expiration times could also help. By default, servlet engines make sure servlet output is not cached by browsers. The HTTP spec http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html may be of some help here. All in all, some experiments are needed to discover what works with the actual IEx builds on the client and is still compatible with the servlet architecture and requirements. Last note: messages on this thread tend to aquire unnecessary quotations, the last had *six* recursively quoted old messages appended. This really messes up the digest. Get some sense guys. Inform yourself about *basic* netiquette. Regards J.Pietschmann --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]