Hi,
i am doing an xsl transformation
i have my xml,xsl and the java class in same folder when i run this code from java class its working fine but when use the same in a webapplication deployed in tomcat i am getting the below error.
CODE:
StreamSource source = new StreamSource("abc.xml")
StreamSource stylesource = new StreamSource("abc.xsl"); TransformerFactory factory = TransformerFactory.newInstance; Transformer transformer = factory.newTransformer(stylesource); StreamResult result = new StreamResult(System.out);
StringWriter sw = new StringWriter;
transformer.transform(source, new StreamResult(sw));
String sReturn = sw.toString;
Exception:
ERROR: 'C:\Documents and Settings\hp.ln\Desktop\apache- tomcat-6.0.16\bin\abc.xsl (The system cannot find the file specified)'
FATAL ERROR: 'Could not compile stylesheet'
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown Source) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(Unknown Source)
pls anyone sort out my prob .Thanks in ADV---Raj
i am doing an xsl transformation
i have my xml,xsl and the java class in same folder when i run this code from java class its working fine but when use the same in a webapplication deployed in tomcat i am getting the below error.
CODE:
StreamSource source = new StreamSource("abc.xml")
StreamSource stylesource = new StreamSource("abc.xsl"); TransformerFactory factory = TransformerFactory.newInstance; Transformer transformer = factory.newTransformer(stylesource); StreamResult result = new StreamResult(System.out);
StringWriter sw = new StringWriter;
transformer.transform(source, new StreamResult(sw));
String sReturn = sw.toString;
Exception:
ERROR: 'C:\Documents and Settings\hp.ln\Desktop\apache- tomcat-6.0.16\bin\abc.xsl (The system cannot find the file specified)'
FATAL ERROR: 'Could not compile stylesheet'
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown Source) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(Unknown Source)
pls anyone sort out my prob .Thanks in ADV---Raj