Re: PDF in a JSP ... searching alternative way

2002-06-20 Thread J.Pietschmann

Massimiliano Cuccia wrote:
> I want to produce a pdf in a jsp, so I have a string fo that contains the fo
> instructions ...
> I had found this code to output the pdf directily in the browser
>   Driver driver = new Driver(new InputSource(new
> StringBufferInputStream(fo)), response.getOutputStream());
> 
> and it's OK, there is another way to do that task?
> I don't want to pass the "response.getOutputStream()" actual parameter ...
> any ideas??

You should not use FOP from an JSP in order to generate
PDF. PDF may be binary, which could confuse the output
(which assumes the output is *character* data).
Use a servlet, and generate the FO with XSLT, as advised,
or check out Cocoon.

J.Pietschmann



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




RE: PDF in a JSP ... searching alternative way

2002-06-20 Thread Sergei Timofejev

InputSource xslfo_doc = new InputSource(xmlfo_input);
ByteArrayOutputStream outstr = new ByteArrayOutputStream();
Driver driver = new Driver(xslfo_doc, outstr);
driver.run();
byte[] content = outstr.toByteArray();
response.setContentLength(content.length);
outstr.close();
response.getOutputStream().write(content);  
xmlfo_input.close();
response.getOutputStream().flush();

-Original Message-
From: Massimiliano Cuccia [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 7:48 PM
To: [EMAIL PROTECTED]
Subject: PDF in a JSP ... searching alternative way


I want to produce a pdf in a jsp, so I have a string fo that contains the fo
instructions ...
I had found this code to output the pdf directily in the browser
  Driver driver = new Driver(new InputSource(new
StringBufferInputStream(fo)), response.getOutputStream());

and it's OK, there is another way to do that task?
I don't want to pass the "response.getOutputStream()" actual parameter ...
any ideas??

thanks in advance
bye



Massimiliano Cuccia



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


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




Re: PDF in a JSP ... searching alternative way

2002-06-20 Thread Holger Prause


- Original Message -
From: "Massimiliano Cuccia" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 20, 2002 6:48 PM
Subject: PDF in a JSP ... searching alternative way


> I want to produce a pdf in a jsp, so I have a string fo that contains the
fo
> instructions ...
> I had found this code to output the pdf directily in the browser
>   Driver driver = new Driver(new InputSource(new
> StringBufferInputStream(fo)), response.getOutputStream());
>
> and it's OK, there is another way to do that task?
> I don't want to pass the "response.getOutputStream()" actual parameter ...
> any ideas??
>

A good way for performing xslt(an render it with fop) is using the xsl
Taglibs from the jakarta project

http://jakarta.apache.org/taglibs/doc/xsl-doc/intro.html

> thanks in advance
> bye
>
> --
--
> 
> Massimiliano Cuccia
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
>



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




PDF in a JSP ... searching alternative way

2002-06-20 Thread Massimiliano Cuccia

I want to produce a pdf in a jsp, so I have a string fo that contains the fo
instructions ...
I had found this code to output the pdf directily in the browser
  Driver driver = new Driver(new InputSource(new
StringBufferInputStream(fo)), response.getOutputStream());

and it's OK, there is another way to do that task?
I don't want to pass the "response.getOutputStream()" actual parameter ...
any ideas??

thanks in advance
bye



Massimiliano Cuccia



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