Changeset 10086


Ignore:
Timestamp:
2005-06-14T11:08:36+12:00 (19 years ago)
Author:
kjdon
Message:

class loader now takes a parent class loader as a constructor arg - the webapp classes are loaded by a different class loader than the system class loader.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/util/CollectionClassLoader.java

    r9422 r10086  
    2323
    2424/** Looks for classes/resources in the collection resources directory
    25     The base class will be the class returned by getSystemClassLoader()
    2625 */
    2726public class CollectionClassLoader
     
    2928
    3029    String base_dir = null;
    31     public CollectionClassLoader(String site_home, String collection_name) {
     30    public CollectionClassLoader(ClassLoader parent, String site_home, String collection_name) {
     31    super(parent);
    3232    this.base_dir = GSFile.collectionResourceDir(site_home, collection_name);
    3333    }
    34     public URL getResource(String name) {
     34
     35    public URL findResource(String name) {
    3536    File resource_path = new File(this.base_dir, name);
    3637    try {
     
    3940        }
    4041    } catch (Exception e) {};
    41    
    42     return super.getResource(name);
     42
     43    return super.findResource(name);
    4344    }
    4445}
Note: See TracChangeset for help on using the changeset viewer.