Shyam A <shyamworks <at> yahoo.com> writes:
>
> Hi,
>
> I'm using iText with my Struts application. I have a
> problem forwarding to my "PDFServlet" from my action
> class, on Internet Explorer 6.0. However, it works
> with IE 5.0.
> Anybody knows any solution/fix to this problem?
>
> Any help is greatly appreciated.
>
> Thanks,
> Shyam
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance Tax Center - File online. File on time.
> http://taxes.yahoo.com/filing.html
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
>
I am using IE6.0 and redirect works.
I recently changed the code and now action class does the pdf generation as
well rather than forwarding it to pdfservlet.
It' something like this:
ByteArrayOutputStream out = getPdfDocument();
resp.setContentType( "application/pdf" );
resp.setContentLength( out.size() );
ServletOutputStream sos;
sos = resp.getOutputStream();
sos.write( out.toByteArray() );
sos.flush();
If you need to redirect, action class should be somthing like this:
response.sendRedirect( "/PDFServlet" );
return null;
Both approached worked for me. I hope this helps.
-Suprigya
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions