No problem. Just make sure you don't try to make isIE4 or the user session
into member variables like I did. I did that a day or so ago for convenience
and wasn't thinking.

-Matt

> -----Original Message-----
> From: Michael Wenczel [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 03, 2002 1:08 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Servlet called multiple times solved
> 
> 
> Thanks for sharing this Matt. I was just going down this road 
> (caching)
> myself. This will save an afternoon or more. regards, mike
> 
> 
> -----Original Message-----
> From: Savino, Matt C [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 03, 2002 12:32 PM
> To: '[EMAIL PROTECTED]'
> Subject: Servlet called multiple times solved
> 
> 
> Thanks to David Frankson and the other members of this board, I have
> finally
> fully solved the problem with IE calling FOP two or three 
> times problem.
> The
> first solution came from this:
> 
> http://support.microsoft.com/support/kb/articles/Q293/7/92.ASP
> 
> But if you read the fine print, you notice that IE only uses
> user-agent=contype on the second hit. That still leaves the first and
> third
> hits calling FOP. There are some clues to tell the difference betweent
> the
> first and third hits, so I was trying to only return the full 
> PDF on the
> third hit. The problem is that IE sometimes decides to be content with
> only
> one hit, and sometimes it decides to make all three. There is no
> apparent
> rhyme or reason to this decision. If you only return the 
> content-type on
> the
> first call when IE has decided to only make one call it just 
> sits there.
> Anyway, the second part of the solution was to cache the PDF 
> byte-array
> in
> the user's session and return it on any subsequent hits on the first
> pass.
> As a key to test that the PDFs are truly the same, I use a counter in
> the
> query string which is the time in milliseconds. 
> 
> Anyway here's the code. As usual there's a bunch of extra stuff, but I
> figure it may help. Please ask if you have any questions.
> 
> -Matt
> 
>  <<ReportGeneratorServlet.java>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 
> 


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

Reply via email to