We solved this kind of problems using GET (not POST) requests from browser
and precomputing the size of the pdf using a ByteArrayOutputStream
for PDF output.
Just tested for IE5+, I'm curious about N6.
Some IEs needed an SP, as you can find on Adobe's site.
Marco
----- Original Message -----
"Pierre-Yves Saumont" wrote(edited):
> Hi everybody,
>
> I am experiencing two problems wiith a servlet returning aplication/pdf
> content.
>
> This servlet retrieves data from a database and converts it to xml. It
then
> call Xalan to transform it to a XSL stylesheet, then call FOP to produce
PDF
> data. All this work fine if I end saving the data to disk.
>
> If the servlet return the pdf data to the client, everything is ok with
> Netscape 4.
>
> But with IE5.5 and N6, a very strange thing happens : on the first request
> after the browser is loaded, when the service method returns, it is called
a
> second time. This time, no parameters are provided. Of course, the result
of
> the first call is not displayed. As the second call has no parameter, I
get
> an error. On subsequent requests, this does not occur. It occurs again if
I
> quit the browser and restart it. (The servlet is using session. I tried
with
> cookies turned on, or off, nothing changed.)
>
> I tried saving the pdf data to disk and, on the second call, read it and
> send it back to the browser. Now, I found another problem : the pdf
document
> is received, but all pages are blank.
>
> The only real workaround was to save the data to disk and send back to the
> browser an HTML page with a static link to that file. This way, the
document
> is displayed without any problem, and the second call to the servlet does
> not occur.
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html