Your servlet container is doing something with the classpath that is causing you to get an older version of the DOM classes in the path ahead of xerces.jar. Download the EnvironmentCheck class
(http://xml.apache.org/websrc/cvsweb.cgi/~checkout~/xml-xalan/java/src/org/apache/xalan/xslt/EnvironmentCheck.java?rev=1.3) and insert the following line immediately before your transformer.transform call: boolean environmentOK = (new EnvironmentCheck()).checkEnvironment(yourPrintWriter); This will show you your classpath and you should be able to identify the older version of the DOM classes that are causing this problem. HTH, Gary > John Gouveia wrote: > > Hi > > Can anybody please help me with this problem. I am using Xalan-J > 2.0.1. and using JSP's. If I execute the transformation in my bean via > a main method it transforms successfully. > > But if I access the same bean via a JSP page the transformation (with > the same xsl and xml files) causes an exception at the 2nd last line > of the code: > > DOMSource xmlIn= new DOMSource(xmlDocument); > StreamResult output = new StreamResult(new StringWriter()); > > TransformerFactory tFactory = TransformerFactory.newInstance(); > Transformer transformer = tFactory.newTransformer(new > StreamSource("string url")); > transformer.transform(xmlIn, output); > > result = (output.getWriter()).toString(); > > the error message: > > JspServlet: unable to dispatch to requested page: > Exception:java.lang.NoSuchMethodError: boolean > org.w3c.dom.Node.isSupported(java.lang.String, java.lang.String) > > The only libraries I am using are servlet.jar(java.servlet package) > and Xerces and Xalan jar files. I have also checked my classpath for > old XML files and there are none. > > Has anybody got this error before. > > thanks --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
