Dear List,
We are using java sdk 1.4.2 which includes dom objects and a xml
transformer - EVERYTHING I need for my code to work. ALL my code imports
begin with javax.xml.* [interfaces] and org.w3c.dom [xml API] and
javax.trasform [for xslt processing].
I want my code ALWAYS -SPECIFICALLY to use the 1.4.2 API, and not use
parsers which provided by Apache Tomcat.
1] How can I force my servlet code which writes xml and returns html to the
client, to ignore all the xml stuff delivered with tomcat.
Here is a simplification of the code that writes the xml file.
// This method writes a DOM document to a file
public static void writeXmlFile(Document doc, String filename) {
try {
// Prepare the DOM document for writing
Source source = new DOMSource(doc);
// Prepare the output file
File file = new File(filename);
Result result = new StreamResult(file);
// Write the DOM document to the file
Transformer xformer = TransformerFactory.newInstance().newTransformer();
xformer.transform(source, result);
} catch (TransformerConfigurationException e) {
} catch (TransformerException e) {
}
}
2] With linux even with JDK 1.4.2 and TC 1.4.27 installed I need ALWAYS to
have xalan.jar installed in my WEB-INF/lib path for the code above, and for
a html transformation to run. On windows with JDK 1.4.2 and TC 1.4.27
installed I dont need xalan.jar in the WEB-INF classpath.
Can anyone shed light ?
regards,
Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]