The recommended way to get resources from the classpath in Confluence is:
1 2InputStream in = com.atlassian.core.util.ClassLoaderUtils.getResourceAsStream(filename, this);
ClassLoaderUtils tries a couple of different classloaders, something we've occasionally found necessary in some application servers.
Rate this page: