Neil I wonder if your image/jpeg files displayed ok in Netscape? Its a couple of years ago, nothing to do with struts, but I had a servlet, serving up images, that was not setting the image type correctly. I was serving jpegs, giff etc. but the servlet had hardcoded image/gif. Internet explorer somehow just coped with it and displayed the images. IE seemed either very lax about it or really smart depending on your point of view. Netscape 4.7 just wouldn't display anything.
Regards Quentin -----Original Message----- From: Neil Carusetta [mailto:ncarusetta@;computer-guidance.com] Sent: 14 November 2002 15:47 To: [EMAIL PROTECTED] Subject: Opening PDF file: Problem and Solution Has anyone had any difficulties with opening a PDF file byte stream in a browser using sub-apps? We got it working but are still unclear as to exactly the reason. Up front I'll mention that we are using sub-applications. We had an action which places a PDF file in the form of a byte[] out on the ServletOutputStream. For some reason the file would not display in the Acrobat plugin. The IE dialog to open or save the file would instead appear. At this point we were able to save the PDF to the client machine, but still remained with the problem of not being able to view the PDF in IE. Now trying this same thing using just a default app worked fine. But we had to make it work using a sub-app. Now comes the confusing part. Streaming out JPEG and Word files worked just fine in our sub-app. Of course, for all three files we are setting the appropriate contentType on the response. We then thought that there might be a problem with the sub-app's configuration. We noticed that in the struts config file, through the controller element, we were setting the contentType to "text/html". For some reason, removing the contentType allowed the stream to be opened in Acrobat. It seems that the contentType setting in the sub-app was overriding that for "application/pdf" but not for "image/jpeg" or "application/msword". Does anyone know why this would be the case? Best of luck, Neil Carusetta CGC Scottsdale, AZ -- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org> -- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>