Confluence 2.6 has reached end of life
Check out the [latest version] of the documentation
The recommended way to get resources from the classpath in Confluence is:
InputStream 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.
Overview
Content Tools
Apps