/** * @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 Iterator getResources(String resource, Object defaultObject) { try { Enumeration resources = getCurrentLoader(defaultObject).getResources(resource); List lst = new ArrayList(); while (resources.hasMoreElements()) { lst.add(resources.nextElement()); } return lst.iterator(); } catch (IOException e) { log.error(e.getMessage(), e); throw new FacesException(e); } }