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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to