Note that Tomcat does NOT use your CLASSPATH when running so there are plenty of possible library mixups. The Java standard library has included plenty of XML capability since 1.4 - are you sure you need those other libraries? Tomcat does use XML for reading configuration files so I don't understand your "Dom isn't supported" comment.
If you have to have them, see the Tomcat docs - class-loader-howto.html for where to put the Jar files so that Tomcat can find them. That file should be part of your normal Tomcat installation. Bill
OK. Checked out Tomcat 4 's Class Loader How-to. I also punted to using Java131. I got no love from either changes. We placed the latested xalan jar files in the WEB-INF/lib directory for the application and in the $CATALINA_BASE/shared/lib directory. Nothing has worked. Any other ideas? Was there anything wrong with the code that I posted that could be causing this issue?
Author and all-around good cowpoke
If that is the error you are still getting, mismatched libraries has to be the cause. Is that version of Xalan supposed to work with Java131? There is a lot of other odd looking code too - it looks like you are using relative file names such as "birds.xsl" that depend on the "current directory" to work - you have no control over the current directory in a servlet environment. If this was my problem I would put the entire transform code in a separate class that could be tested outside the servlet environment first. Bill
Joined: Jun 19, 2005
Tried separating code into a separate class. (after removing all of the servlet syntax) the code compiles and works.
And after many attempts at deleting jar files and adding them back I have proven you correct. I eliminated all of the xerces and xalan jar files except those in the WEB-INF/lib directory and everything works.