  | |  | Servlet File Download dialog problem (IE6,Adobe 6.0) | Servlet File Download dialog problem (IE6,Adobe 6.0) 2003-11-29 - By Chris Pratt
Back Make sure that you set the content type to "application/pdf". (*Chris*) -- -- Original Message -- -- From: Jason Smith To: fop-user@(protected) Sent: Saturday, November 29, 2003 3:37 PM Subject: Servlet File Download dialog problem (IE6,Adobe 6.0)
I'm new to FOP. I'm trying to dynamically create a PDF from a struts web application. In my action bean I execute a JSP URL that returns the FOP xml. I take the return stream and place it into a reader and then pass it to renderFO method from the example servlet.
This seems to work like I want it to. However, I'm running into an issue with IE. Whenever I input the URL for my action bean, the first time through I get the "File Download window". The file type is "Adobe Acrobat Control for ActiveX". If I cancel and then resubmit the very same URL, the PDF is displayed.
I have read the FAQ and several messages about problems with IE but have not run across my exact problem. In them they say to include a dummy.pdf at the end of the URL. And to include a PDF extension as part of the base URL. I have done both but still have the issue.
I have tried various URLs including:
....IncidentPDFPath.do?incidentSID=123245&x=dummy.pdf ....IncidentPDFPath.pdf?incidentSID=123245&x=dummy.pdf
With the same results.
The funny thing is the second time I submit the URL from the browser it works . If I open a new browser and submit it I get the "File Download" window again the first time. The second time from the same browser the PDF is displayed.
Thanks for any help.
Jason Smith Project Refinery www.projectrefinery.com jsmith@(protected) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2800.1276" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT size=2>Make sure that you set the content type to "application/pdf".</FONT></DIV> <DIV><FONT size=2> (*Chris*)</FONT></DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">-- -- Original Message -- -- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=jsmith@(protected) href="mailto:jsmith@(protected)">Jason Smith</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=fop-user@(protected) href="mailto:fop-user@(protected)">fop-user@(protected)</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, November 29, 2003 3:37 PM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> Servlet File Download dialog problem (IE6,Adobe 6.0)</DIV> <DIV><BR></DIV> <DIV>I'm new to FOP. I'm trying to dynamically create a PDF from a struts web application. In my action bean I execute a JSP URL that returns the FOP xml. I take the return stream and place it into a reader and then pass it to renderFO method from the example servlet.</DIV> <DIV> </DIV> <DIV>This seems to work like I want it to. However, I'm running into an issue with IE. Whenever I input the URL for my action bean, the first time through I get the "File Download window". The file type is "Adobe Acrobat Control for ActiveX". If I cancel and then resubmit the very same URL, the PDF is displayed.</DIV> <DIV> </DIV> <DIV>I have read the FAQ and several messages about problems with IE but have not run across my exact problem. In them they say to include a dummy.pdf at the end of the URL. And to include a PDF extension as part of the base URL. I have done both but still have the issue.</DIV> <DIV> </DIV> <DIV>I have tried various URLs including:</DIV> <DIV> </DIV> <DIV> <DIV>....IncidentPDFPath.do?incidentSID=123245&x=dummy.pdf</DIV>... .IncidentPDFPath.pdf?incidentSID=123245&x=dummy.pdf</DIV> <DIV> </DIV> <DIV>With the same results.</DIV> <DIV> </DIV> <DIV>The funny thing is the second time I submit the URL from the browser it works. If I open a new browser and submit it I get the "File Download" window again the first time. The second time from the same browser the PDF is displayed.</DIV> <DIV> </DIV> <DIV>Thanks for any help.</DIV><BR><BR>Jason Smith<BR>Project Refinery<BR>www.projectrefinery.com<BR>jsmith@(protected)</BLOCKQUOTE ></BODY></HTML>
Earn $52 per hosting referral at Lunarpages.
|
|
 |