You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Hardarshan Singh <sa...@yahoo.com> on 2003/06/23 00:04:39 UTC

Invoking FOP Servlet from struts:Please help

Hi, 
 
I am conveting jdbc to xml. I have written an XSL file for the xml generated. 
I want to use FOPServlet. 
 
Questions : 
1. Where should the xml and xsl files be physically located in the project ? 
2. How can i invoke the FOP servlet from struts (i have to send xml and xsl files)
    to the servlet. 
3. How can i redirect the generated pdf to browser , i mean using using ActionForward? 
 
Any code snippets will be of great help. 
 
Please reply and thanks for help in advance.
 
SS
 
 
 
 
 
 


---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Re: Invoking FOP Servlet from struts:Please help

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Hardarshan Singh wrote:
> Questions : 
> 1. Where should the xml and xsl files be physically located in the project ? 
> 2. How can i invoke the FOP servlet from struts (i have to send xml and xsl files)
>     to the servlet. 
> 3. How can i redirect the generated pdf to browser , i mean using using ActionForward? 

These sound as if they were more suited on a struts related
list...

J.Pietschmann



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


Re: Invoking FOP Servlet from struts:Please help

Posted by Michael Duffy <du...@yahoo.com>.
Hi Hardarshan,

1. I'm assuming that you only need to read files, not
write.  If that's the case, put the XML and XSL files
under WEB-INF/xml and WEB-INF/xsl, respectively, and
access them using ServletContext's getResourceAsStream
method.

2. You might get the encoded (very important) XML and
XSL from request parameters or attributes, using
HttpServletRequest getParameter or getAttribute
methods.

3. Set the content type to "application/pdf" and write
the bytes to the response.

Check out http://xml.apache.org/fop/servlets.html -
it's got some nice code that should help you out. -
MOD

--- Hardarshan Singh <sa...@yahoo.com> wrote:
> Hi, 
>  
> I am conveting jdbc to xml. I have written an XSL
> file for the xml generated. 
> I want to use FOPServlet. 
>  
> Questions : 
> 1. Where should the xml and xsl files be physically
> located in the project ? 
> 2. How can i invoke the FOP servlet from struts (i
> have to send xml and xsl files)
>     to the servlet. 
> 3. How can i redirect the generated pdf to browser ,
> i mean using using ActionForward? 
>  
> Any code snippets will be of great help. 
>  
> Please reply and thanks for help in advance.
>  
> SS
>  
>  
>  
>  
>  
>  
> 
> 
> ---------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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