Hello, Am having a hard time researching this one. I am currently using a jsp page with imbedded jsp's to display data from a database as html in a browser. I would like to be able to convert the output to xml as well for additional processing but cannot figure out how to do that conversion on the fly. My ultimate goal is to apply an xsl-fo style sheet to display the web page in a pdf document as well. Has anybody come across this situation? I feel that once I can get the generated html page as a DOM it should be easy to use FOP for pdf display. Any thoughts or suggestions would be greatly appreciated. Regards, Richard
Originally posted by Richard Elsberry: Hello, Am having a hard time researching this one. I am currently using a jsp page with imbedded jsp's to display data from a database as html in a browser. I would like to be able to convert the output to xml as well for additional processing but cannot figure out how to do that conversion on the fly. My ultimate goal is to apply an xsl-fo style sheet to display the web page in a pdf document as well. Has anybody come across this situation? I feel that once I can get the generated html page as a DOM it should be easy to use FOP for pdf display. Any thoughts or suggestions would be greatly appreciated. Regards, Richard
-------------------------------------------------- To convert the output of JSP page to xml: 1- You have to be sure that the JSP page content is text/xml adding: <%@ page contentType="text/xml"%> 2- You have to notify the JSP page which the xslt file should be used to process transformation like <?xml:stylesheet type="text/xsl" href="file.xsl" version="1.0" encoding="UTF-8"?>
Djamel, Thanks for you response. I would like to have the jsp file output to html as it already does. However, I would also like to convert a copy of the dynmaic output to another file for processing. I have been trying to figure out a way to do this but have not had much luck. Richard
It sounds like you are trying to get two outputs from the the same page at the same time, which I don't think can be done. You might want to have two different versions of the page with different outputs, the pages being reached by different URLs, or have essentially two different versions of the same page both on the same physical page with a parameter determining which part of the page is generating the output. [ May 20, 2002: Message edited by: Edward Brode ]
Any info in converting this html to a pdf...any idea, tool ? and how it works..please advise... Say I want to convert this html to PDF upon a submit button is click...? Thanks
You might be able to get a copy of the html if you use filters. Filters are java code which sit in between the request/response and jsp/servlet. So, by using this filter mech, u should be able to create a xml doc on the fly. (I haven't worked with filters; just theoritical knowledge. Pls explore in that area). Regards, Balaji [ January 30, 2003: Message edited by: Jeya Balaji ]
hi there i m trying very hard to display the contents of a pdf file whcih is stored in my oracle table as a blob field, but i m not able to stream it out through response object. i have tried everything..plzzzz help me out...