I've also had this problem -- you could try aliasing your servlet, or
alternatively adding a dummy query string on the end, along the lines of
?foo=bar.pdf. This seemed to work for me.
JT
-----Original Message-----
From: Alex McLintock [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 09, 2001 2:16 AM
To: [EMAIL PROTECTED]
Subject: Re: FOP Servlets being invoked twice
--- Alex Amies <[EMAIL PROTECTED]> wrote:
> I have a problem with a servlet, which serves up pdf documents,
> invoking the servlet twice for every time I request the
> url using my browser. The pdf document is produced
> correctly in both instances. Anybody else seen this
> problem, know what it is, or have a constructive suggestion?
If you check the mailing list archives you will see that at least one person
has seen this problem (with IE I think) and can't find a way around it.
However I don't see it myself so it might be fixable.
> long sixty = System.currentTimeMillis() + 60*1000;
> res.setDateHeader("Expires", sixty);
This is the only bit I am worried about - how does this help?
Since you've mentioned servlets I'll throw my problem into the fray.
I've seen the content size problem (which you have correctly solved in your
code)
but now I have a problem with a particular build of IE. Basically the PDF
doesn't appear -
in fact neither does acrobat reader....
The problem occurs on the IE version 5.50.4522.1800 and not with other IE5.5
versions, eg.
5.50.4134.0600.
(Incidently the data is submitted to the servlet using Post - apparently
this is
the cause of the bug in IE)
Now I got so fed up with this that I tried saving the PDF file to disk and
then issuing
a redirect to the static PDF file. Hooray this works in the problem version
of IE.
Oh b(*&^(*er it no longer works in the older versions of IE.
I've tried the servlet "sendRedirect", I've tried a Location header with
relative and
absolute URLs, I've even just tried a "Refresh" header. Nothing seems to
work.
So folks - what are your servlet experiences....?
I feel like I'm going round in circles here.
The one thing I haven't really done is to change the URL to end with ".pdf"
Basically I can't create a class called "something.pdf" so haven't created a
servlet
with that name yet. I've tried servletname;stupidie.pdf but that didn't seem
to help.
Alex
=====
Alex McLintock [EMAIL PROTECTED] Open Source Consultancy in London
OpenWeb Analysts Ltd, http://www.OWAL.co.uk/
SF and Computing Book News and Reviews: http://news.diversebooks.com/
Get Your XML T-Shirt <t-shirt/> at http://www.inversity.co.uk/
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]