I am loading a configfile using ClassLoader.getSystemResourceAsStream. The file is placed in the src folder of my GWT application. It ends up in war/WEB-INF/classes.
I copy the war folder to tomcat under webapps/MyApp. When running the application, getSystemResourceAsStream throws an exception.
When running under Jetty it works fine.
Try:
getClass().getClassLoader().getResourceAsStream();
It will definitely work; I also had same type of problem. This question describes why you are having that problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With