Thanks for your answer. I will cache the pdf for later evaluation. The webserver has access to this pdf (saved on hard disk).
I want to open the pdf in the browser and show the jsp page at the same time. How must I write the action class? > -----Ursprüngliche Nachricht----- > Von: Jesse Alexander (KXT) [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 3. August 2004 10:49 > An: Struts Users Mailing List > Betreff: RE: struts and iText > > > Well,... > > If you already have the PDF generated, why not directly write > it to the response(and in this way to the browser)? > > To fulfill your use case as described. > Your action generates the PDF and caches it somewhere. Then > it will forward to the JSP-File containing the message and > the link. This link either points to a Struts-Action or a > plain servlet. This target-Servlet (or Action) retrieves the > cached PDF and sends it to the browser. > Where to cache? > a) File-System > - you need a writable location and remember to install some > cleaning mechanism > - the link presented could be just the reference to the > cached file if that directory > readable by the webserver > b) user-session > - dangerous in a clustered environment (too much stuff to > propagate around) > - memory usage (usually the recommendation is not to use > more than 4K in session...) > - PDF only available to original user > - easy to program > c) separate cache > - adds another component to your app (DO NOT roll your own > cache, there are quite a > number of tested cache-libraries) > - could make the PDF available also to other users (depends > on the use-case and the > cache-library) > > hope this helps > Alexander > > > -----Original Message----- > From: Otto, Frank [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 03, 2004 9:18 AM > To: '[EMAIL PROTECTED]' > Subject: struts and iText > > Hi, > > I have generated a pdf with iText. In my action class I want > to write it in the response object. > > The result should be a jsp-page with content "pdf generated > successful" and a link to this pdf. The pdf should be shown > in a new browser window too. > > Has someone do this? How can I do this? > > > kind regards, > > frank > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]