Hi There,
I agree with the strategies Alexender told. I also
append some code to open a new window just ease your
work.
-----------------------------------------------
<script language="javascript">
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname,
'width=430,height=280,scrollbars=no');
return false;
}
</script>
<h3>
<A HREF="printPdf.do?method=default" onClick="return
popup(this, 'Name Of The New Screen')">PDF
Generated Successfully</A>
</h3>
-----------------------------------------------
Regards,
Buland
--- "Jesse Alexander (KXT)"
<[EMAIL PROTECTED]> wrote:
> 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]
>
>
=====
<DIV>
<P align=left><FONT face="Times New Roman">Buland Altaf Malik,<BR><STRONG>Sr. Software
Engineer</STRONG>, <BR>Softech System's(pvt)Ltd. <BR>10/25 asad jan road lahore,cantt
- 54810 Pakistan<BR>Tel: 92-42-6665812 , 92-42-6660802</FONT></P>
<P align=left><FONT face="Times New Roman">Mob: 0333-4344113<BR>Fax:
92-42-6665792</FONT></P>
<P align=left><FONT face="Times New Roman"><A
href="http://www.softech.com.pk/">http://www.softech.com.pk</A><BR><A
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</A></FONT></P></DIV>
__________________________________
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now.
http://messenger.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]