code: public static URL getResource(String resourceName, Class<?> callingClass) {
  		URL url = Thread.currentThread().getContextClassLoader().getResource(resourceName);
  		if (url == null) {
  			url = ClassLoaderUtil.class.getClassLoader().getResource(resourceName);
  		}
  		if (url == null) {
  			ClassLoader cl = callingClass.getClassLoader();
  			if (cl != null) {
  				url = cl.getResource(resourceName);
  			}
  		}
  		if ((url == null) && (resourceName != null)
  				&& ((resourceName.length() == 0) || (resourceName.charAt(0) != '/'))) {
  			return getResource('/' + resourceName, callingClass);
  		}
  		return url;
  	}
docs: Load a given resource.
  
  This method will try to load the resource using the following methods (in
  order):
  <ul>
  <li>From Thread.currentThread().getContextClassLoader()
  <li>From ClassLoaderUtil.class.getClassLoader()
  <li>callingClass.getClassLoader()
  </ul>
  
  @param resourceName
  The name IllegalStateException("Unable to call ")of the
  resource to load
  @param callingClass
  The Class object of the calling object
  @return Matching resouce or null if not found