I assume the result of your form submission should be the PDF returned. I'm doing this in an app... you need to write out the results to ServletOutputStream, make sure you set the content type header and also the content-length header. Shoudl work then.

I've also found that Acrobat is buggy when it comes to viewing PDF's in the browser, so if possible, have your clients set the option to have Acrobat open the file in a separate window. If you can't, it should still work, but may not for some.

Frank


From: "tvvincam" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: problem with returning a pdf
Date: Mon, 21 Jun 2004 02:22:28 -0000

Hi,

I'm using JasperReports to create a pdf based on user criteria
submitted via a struts form.

I've run into a problem with a feature in IE
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q293792

Basically, IE will resubmit the request 3 times. This is causing a
problem because the reset method is called on my form bean and wipes
out all my boolean selection criteria.

The iText web site http://www.lowagie.com/iText/faq.html#msie
has the following work around:
<HTML>
<BODY leftMargin=0 topMargin=0 scroll=no>
  <EMBED src="http://myserver/pdfCreationServlet"; width="100%"
height="100%" type=application/pdf fullscreen="yes">
</body>
</html>

but I cannot figure out how to get the user input using this method.

Is there a way around this problem? The only way I can think of doing
is to save the pdf byte[] in session and then get redirect the user
to the above work around page. The above link will point to another
action which will get the pdf byte[] from session and write it to the
response. I really don't like this solution and would appreciate any
help.

Cheers,
N


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


_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfeeŽ Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



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



Reply via email to