You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Semprini Davide <da...@cineca.it> on 2001/09/21 11:08:44 UTC

HELP - PASSING PARAMETER

Hi at all,

I have two important question:

1) I have a jsp page that call a java function of my external class.
I pass at this object dynamic xml and stylesheet xsl
and then I have to pass some parameter at my stylesheet
that are stored in HttpSession object.
If I use XSLTransform from fop there isn't
a possibility passing parameter! Is this True??????
I have utilized instead of it the class: javax.xml.transform.Transformer
With this class I can pass parameter to stylesheet and perform the 
transformation
getting out InputSource that I pass at Driver.

2) When the render process end in my JSP
return ByteArrayOutputStream that I convert
setting the contentType:

1) response.setContentType("application/pdf");
2) ByteArrayOutputStream ris_pdf = ((XMLTransform) 
request.getAttribute("XMLTransform")).processXML_PDF(abs_path, 
(ParamXSL[]) request.getAttribute("ParamXSL"), formato);
  
 
   3) byte[] content = ris_pdf.toByteArray();
    4) response.setContentLength(content.length);
    5) response.getOutputStream().write(content);
    6) response.getOutputStream().flush(); 

At this point appear the browser form that call
me If I want to save or open the result!!!!!!!!
why if I have set the content type?????? and If I choose
acrobat I can view the PDF File!

(I use Struts and the file my output file is called ListaFacolta.do)


 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org