Hi Oleg,

first thanx for your response. It's indeed an ClassCastException. You're right, but 
fop.far
is from July 2002, so it's new. I make an attempt from command line and wrote
following short programm which works fine. Hmm!
What is wrong with the servlet, what goes wrong during "Driver driver = new Driver();"?
Any idea?

Martin

####################### Command Line Programmm ####################
import java.io.*;
import org.xml.sax.*;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;

import org.apache.fop.apps.Driver;
import org.apache.fop.apps.Version;
import org.apache.fop.apps.InputHandler;
import org.apache.fop.apps.XSLTInputHandler;
import org.apache.fop.messaging.MessageHandler;
import org.apache.fop.svg.*;
import org.apache.fop.fo.*;

import org.apache.batik.util.XMLResourceDescriptor;
import org.apache.avalon.framework.logger.ConsoleLogger;
import org.apache.avalon.framework.logger.Logger;


public class fopdriver {
 public static void main(String[] args) {
        try {
      Driver driver = new Driver();
      driver.setRenderer(Driver.RENDER_PDF);
      File xmlFile = new 
File("C:\\jakarta-tomcat-4.0.1\\webapps\\fop\\WEB-INF\\lib\\glossary.xml");
      File xslFile = new 
File("C:\\jakarta-tomcat-4.0.1\\webapps\\fop\\WEB-INF\\lib\\glossary.xsl");
      File outFile = new 
File("C:\\jakarta-tomcat-4.0.1\\webapps\\fop\\WEB-INF\\lib\\glossary.pdf");
      InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile);
      XMLReader parser = inputHandler.getParser();
      driver.setOutputStream(new FileOutputStream(outFile));
      driver.render(parser, inputHandler.getInputSource());
        } catch (Exception ex) {
                     System.out.println("Lade neuen driver Kon2");
        }
    }
}
###############################################################




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to