This content has been marked as final.
Show 3 replies
-
1. Re: Loading a file into an InputStream within webservice cod
anacarda Apr 6, 2008 5:09 PM (in response to anacarda)I can load the file using the following code:
FileInputStream loInputXSLT = new FileInputStream("/var/opt/transformation.xslt");
However... I would really like this xslt file to be located in some sort of resource directory within the jar file... eg: META-INF or something... is this possible?
I tried using getResourceAsStream() as above, however, this does not work... -
2. Re: Loading a file into an InputStream within webservice cod
peterj Apr 7, 2008 12:16 PM (in response to anacarda)Try:
URL f = Thread.currentThread().getContextClassLoader().findResource("transformation.xslt"); FileInputStream xxx = new FileInputStream(f);
and place transformation.xslt in the base directory of the JAR file. -
3. Re: Loading a file into an InputStream within webservice cod
anacarda Apr 7, 2008 5:43 PM (in response to anacarda)Thanks for that, thats what I was looking for :)