Hello all,
two weeks ago, Kuehnberger <[EMAIL PROTECTED]> wrote:
> My servlet can produce html or pdf, depending on a parameter which is
> passed.
> I read the discussion about that problem, but whatever I tried my
> servlet is still called twice when the output is pdf,
> if the out output is html the servlet is invoked just once.

This is apparently due to a fundamental design flaw in IEx. It
first tries to derive the MIME type of the content of a URL from
the URL itself. If this doesn't work, it uses the content-type header
just loaded and loads the URL again.
Determining the MIME type from the URL has its own quirks. Preferably
the URL ends in .pdf. If your servlet invocation path doesn't end
in .pdf, add a dummy parameter with the value .pdf at the end.
It is said that URLs like the following would be handled properly

http://some.host/some/path/file.pdf
http://some.host/some/path/stuff.asp?param=value&dummy=.pdf

HTH
J.Pietschmann

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

Reply via email to