I have deployed a webbundle in karaf. In the web-inf folder i have kept some files. is there a way to access those using absolute path. Or do i need to keep the reources in karaf deploy folder.
Asked
Active
Viewed 171 times
1 Answers
2
There is no absolute path for resources deployed in a osgi environment as those resources aren't "unziped" to a working directory. So yes you need to access these resources via the bundle context classloader. Or keep those resources outside of your bundle, this is completely dependent on your use-case.

Achim Nierbeck
- 5,265
- 2
- 14
- 22
-
In the case of a web bundle, will the bundle context classloader find resources in /WEB-INF or do they have to reside in /WEB-INF/classes? I guess the latter? – Ralf Feb 19 '16 at 07:34
-
depends on how you configure your classpath in the webbundle, but /WEB-INF should already be accessible. – Achim Nierbeck Feb 19 '16 at 07:43