users@glassfish.java.net

XSL location

From: <glassfish_at_javadesktop.org>
Date: Mon, 09 Aug 2010 08:10:07 PDT

Hi,

I have a web app that receives an XML document and transforms it according to an XSL. It all works fine, but only when the XSL file is placed at the root of the domain i.e. domains/mydomain/myfile.xsl. This is not necessary a problem, but is there any way that glassfish can be told to find this file among the java src files for the application?

The code that specifies the xsl file is:


 Transformer transformer = transformerFactory.newTransformer(
                    new javax.xml.transform.stream.StreamSource("trans.xsl"));
            
            transformer.transform(xmlSource, result);


Am I doing something wrong in the code?

Any advice is appreciated!

Thanks
Michael
[Message sent by forum member 'aremstar']

http://forums.java.net/jive/thread.jspa?messageID=479685