oakleyx wrote:
Currently this is the code that i'm calling to return the path:
ClassLoader loader = Thread.currentThread().getContextClassLoader();
URL url = loader.getResource(this.filename);
..
..
String path = url.getPath();
repos = new File(path);
..
You have done that partially right. You shouldn't be using the absolute file path while working in Java EE environment. Instead, what you (typically) need to do is:
InputStream is = classLoader.getResourceAsStream(filename);
// then use the inputstream for further processing.
How do you use the "repos" later on in your code?