Tamas, do you by chance have custom fonts or images in the PDF that might be getting retrieved over a non-secure connection? A PDF works just like HTML in that the document is returned, and then the browser makes requests for embedded resources, including images and non-standard fonts.

I too had all manner of problems serving PDFs over an SSL connection. I don't recall your exact problem though, although it *does* sound familiar.

One problem I remember for sure was the cache headers... do you by chance have the controller configured to set them? If so, drop that and use the CacheControlFilter in JWP and map it so you *don't* set the headers for the URL that you retrieve the PDF with.

I have an app in production that streams PDFs back right now, and it's actually an IE-only app, so that in and of itself *can* definitely be done... Actually, what I do is a bit of a hybrid... I write the PDF to a database, and then redirect to an Action that streams it.

The other problem that *always* comes up, which might be harder for you to deal with, is in the Acrobat plug-in (which is a buggy piece of s**t by the way) there is an option to open PDFs in the browser or not... I've had some users that have to be set one way, others that have to be set the other, no pattern I can see.

One other suggestion is to throw Etheral on the line while retrieving a PDF... you just may see what's going on right away. Like I said the PDF plug-in is absolutely horrendous, and I'd be willing to bet that's the source of your problem, not IE (this time!).

Just some other things you might want to check.

Frank

Wendy Smoak wrote:
On 11/25/05, Tamas Szabo <[EMAIL PROTECTED]> wrote:


Well, that's why I said that it's a strange behaviour.
Because I'm pretty sure that everything goes over ssl in our app too.
And I tried executing the exact same code using a GET request and then I
don't get the confirmation box.


Okay, then I'm pretty sure it *is* the same thing. :)  I just didn't
make a note of the exact error message on the Wiki page.


I still don't understand what do you mean by sending IE some text?
Your whole webapp consisted just from a pdf generator?


No, but this particular page was intended to be:
   1. POST form over SSL
   2. Display the PDF


And if not then why do you say that you sent some text
to IE before sending the PDF?


Instead of trying to serve the PDF directly in response to the form
post, I instead forward to a JSP that sends some HTML.  That, IE can
deal with.

I also think it's a bug in IE, but it's not like we can wait around
for them to fix it. :)  If you search the archives either here, on
tomcat-user or on comp.lang.java you'll probably find the original
discussion.  I don't remember where it was, and it was years ago now,
but (as usual) I didn't come up with this solution on my own.


I'm not trying to bug you I just want to know the exact circumstances in
which this ?error? occurs.


You're not bugging me, I'm happy to try to save you the *days* I went
round and round with this.

The problem seems to occur when a user posts a form over SSL, and you
try to respond with a PDF. (It might be any binary content, I don't
know.)  The workaround is to respond not with the PDF, but with some
HTML, in this case a bit of HTML that redirects to a URL where the PDF
can be found.

Don't hesitate to ask for more clarification-- unfortunately this was
all so long ago that I'm having trouble coming up with a good
explanation.

--
Wendy

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





--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

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

Reply via email to