/** * @param resource * Name of resource(s) to find in classpath * @param defaultObject * The default object to use to determine the class loader (if none associated with current thread.) * @return Iterator over URL Objects */ public static Collection<? extends URL> getResources(String resource, Object defaultObject) { try { Enumeration<URL> resources = getCurrentLoader(defaultObject).getResources(resource); List<URL> lst = new ArrayList<URL>(); while (resources.hasMoreElements()) { lst.add(resources.nextElement()); } return lst; } catch (IOException e) { log.log(Level.SEVERE, e.getMessage(), e); throw new FacesException(e); } }