aspose file tools*
The moose likes XML and Related Technologies and the fly likes xml FOP and jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "xml FOP and jsp " Watch "xml FOP and jsp " New topic
Author

xml FOP and jsp

raul manzano
Greenhorn

Joined: Oct 05, 2002
Posts: 13
any one knows how can i generate pdf from a jsp if the xml source is generate for another jsp??
can anyone help me?any source code of a example??
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by raul manzano:
any one knows how can i generate pdf from a jsp if the xml source is generate for another jsp??
can anyone help me?any source code of a example??

The Apache FOP package comes up with a example servlet(FopServlet.java), see the docs folder to get the source code. Its basically converts a given xml+xsl into a PDF or a give fo into a PDF.
If you want this to be done in a JSP, then you can better write a java bean for doing this server side process.
All you have to do is add the neccessary jar files in to the lib directory of your web apps and write the servlet or javabean.
The example code got everything to help you.
Hope this helps
Regards
Balaji


Spritle Software Blogs
raul manzano
Greenhorn

Joined: Oct 05, 2002
Posts: 13
my problen is that i dont have xml files, i have a xml source from a jsp .
How i do it ? examples?
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by raul manzano:
my problen is that i dont have xml files, i have a xml source from a jsp .
How i do it ? examples?

One temporary solution is to write the xml file into a temp location and give it as input to XSLTInputHandler.
If your xml is org.w3.dom.Document object, you can pass it to fop as is, please see Driver javadocumentation(API) in fop src distribution. it will help you.
A search in http://marc.theaimsgroup.com/?l=fop-user may also help you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: xml FOP and jsp
 
Similar Threads
How to manually invoke jsp servlet?
Is there a WSDL generator?
UML to XML Schema Tools ?
generate xslt
Generating Schema from an XML file