Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\utilities\fop\WEB-INF\classes\apex_fop.jsp
<%@ page import='java.io.*'%> <%@ page import='org.xml.sax.InputSource'%> <%@ page import='org.apache.fop.apps.Driver'%> <%@ page import='org.apache.fop.apps.Options'%> <%@ page import='oracle.xml.parser.v2.XMLDocument'%> <%@ page import='oracle.xml.parser.v2.XSLProcessor'%> <%@ page import='oracle.xml.parser.v2.XSLStylesheet'%> <%@ page import='oracle.xml.parser.v2.DOMParser'%> <% response.setContentType("application/pdf"); XMLDocument v_doc; XSLStylesheet v_xsl = null; String v_fop; DOMParser parser = new DOMParser(); XSLProcessor processor = new XSLProcessor(); // set the encoding for the XML Processing String v_encode = "UTF-8"; // get the XSL v_xsl = new XSLStylesheet(new java.io.StringReader(request.getParameter("template")),null); // get the XML String from the form which was posted parser.parse(new java.io.StringReader(request.getParameter("xml"))); // get the XML Document v_doc = parser.getDocument(); // create an output stream to get the transformed results ByteArrayOutputStream v_out = new ByteArrayOutputStream(); // transform the xml and xsl to get an FOP processor.processXSL(v_xsl, v_doc, v_out); // convert the FOP byte array to a string with encoding set above v_fop = new String(v_out.toByteArray(),v_encode); // // Now call the apache FOP processing // Driver driver = new Driver(); // set the desired output // see http://xml.apache.org/fop/output.html for all output types driver.setRenderer(Driver.RENDER_PDF); // set the input for the FOP engine driver.setInputSource(new InputSource(new StringReader(v_fop))); // set the output to stream to the browser driver.setOutputStream(response.getOutputStream()); // process driver.run(); %>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de