I use Windows XP Pro. My JAVA_HOME environment variable points to c:\j2sdk1.4.2_05. The CLASSPATH is set to have as the first element "%JAVA_HOME%\bin". I've written an XSL Transform servlet that makes use of the package javax.xml.transform. Why do I get the following error:

javax.servlet.ServletException:
javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerException:
java.net.MalformedURLException: unknown protocol: c

The four lines above actually appear altogether in one line. And the error appears to be due to the following piece of code where I'm trying to get the path to a folder on the local drive to access a file:

String XML_WORK_PATH = "/WEB-INF/work_xml";
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer =
      tFactory.newTransformer(new 
javax.xml.transform.stream.StreamSource(getServletContext().getRealPath(XML_WORK_PATH) + 
"\\" + xslParam)); //xslParam is an XSL file name


The Malformed URL Exception does not occur on another machine running Windows 
XP Server.


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

Reply via email to