On 20 Jul 2001 12:24:04 +0800, Abdul Wahab wrote:
> 
> I have coded my servlet to convert PDF from XML using FOP.
> It is working in Netscape. I can view my PDF.
> When I try to run that particular servlet from IE5.5, It
> is not coming.  But I can see my rendered debugging message
> in the server console.
> My code is below...
> 
>     .......
>     .......
>     byte[] content = out.toByteArray();
>     response.setContentType("application/pdf");
>     response.addHeader("Content-Disposition", "inline;
filename=test.pdf");
>     response.setContentLength(content.length);
>     response.getOutputStream().write(content);
>     response.getOutputStream().flush();
>     response.getOutputStream().close();
> 
> I hope my code is correct.  But I couldn't understand why is
> this? Can you help me.

Use 'wget -s' or 'telnet URL 80' to request the servlet, and a static
PDF file, using HTTP.  And compare the response headers.  Investigate
the differences.  There has to be a difference, right?

To simulate IE5.5 more, you can capture the IE5.5's request header from
inside the servlet.  Both telnet and wget give you ways to specify
request headers.

(wget is part of the Cygwin package for Windows.  It's Red Hat's
(formerly Cygnus's) POSIX emulation library + a lot more.  Get it from
http://cygwin.com .  It is also a GNU tool, available for all UNIX
platforms, usually come with Linux distributions.  A Google search get's
you to the source.)

-- 
Weiqi Gao
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to