This content has been marked as final.
Show 2 replies
-
1. Re: Getting resources in JBoss 3.0.8
aburton Jul 6, 2004 1:16 AM (in response to aburton)Putting my resources in a completely new JAR file and dropping it in the deploy directory seemed to make it work...
Now can anyone tell me why the class loader has been done this way... so you can't get to resources in the WARs own file or in JARs within the WAR lib directory?!!!!
Seems fairly like a rather silly thing to do... basically wasted a entire day on this... -
2. Re: Getting resources in JBoss 3.0.8
rzanner Jul 9, 2004 5:30 AM (in response to aburton)Hi Alex,
"aburton" wrote:
Hi all,
...snip...
InputStream in = this.getClass().getClassLoader().getResourceAsStream("/com/mycompany/resource/MBTransform.xsl");
...snip...
you should have tried it without the leading slash "/" - this way:
InputStream in = this.getClass().getClassLoader().getResourceAsStream("com/mycompany/resource/MBTransform.xsl");
To finish with an old developer word: "On my machine it works...".
HTH,
René