Changeset 14323


Ignore:
Timestamp:
2007-08-06T20:24:00+12:00 (15 years ago)
Author:
qq6
Message:

set download web.xml first

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/greenstone3/ServletConfiguration.java

    r14310 r14323  
    6868   
    6969    this.gsdl3_path = gsdl3_path;
    70    
     70
     71    if (Gatherer.isGsdlRemote){
     72        if (RemoteGreenstoneServer.downloadWebXMLFile().equals("")) {
     73        System.err.println("Error: Could not download web.xml.");
     74        System.exit(0);
     75        }
     76    }
    7177    //String web_xml_path = gsdl3_path + File.separator + "web" + File.separator + "WEB-INF"+ File.separator + "web.xml";
    7278    File web_xml;
     
    8389    this.sites = new ArrayList();
    8490    if (Gatherer.isGsdlRemote){
    85         if (RemoteGreenstoneServer.downloadWebXMLFile().equals("")) {
    86         System.err.println("Error: Could not download web.xml.");
    87         System.exit(0);
    88         }
    8991        String sites_on_server = RemoteGreenstoneServer.getSiteNames();
    9092        if (sites_on_server.equals("")) {
     
    101103        }
    102104    }else{
    103     // find the sites
    104     File start = new File(Utility.getSitesDir(gsdl3_path));
    105     File possible_sites[] = start.listFiles();
    106     ArrayTools.sort(possible_sites);
    107     for (int i=0; possible_sites != null && i < possible_sites.length; i++) {
    108         File site_config = new File(possible_sites[i], "siteConfig.xml");
    109         if (site_config.exists()) {
    110         this.sites.add(possible_sites[i].getName());
     105        // find the sites
     106        File start = new File(Utility.getSitesDir(gsdl3_path));
     107        File possible_sites[] = start.listFiles();
     108        ArrayTools.sort(possible_sites);
     109        for (int i=0; possible_sites != null && i < possible_sites.length; i++) {
     110        File site_config = new File(possible_sites[i], "siteConfig.xml");
     111        if (site_config.exists()) {
     112            this.sites.add(possible_sites[i].getName());
     113        }
    111114        }
    112115    }
    113     }
     116
    114117    this.mappings = new HashMap();
    115118    Document web_config = XMLTools.parseXMLFile(web_xml.getAbsolutePath(), false);
Note: See TracChangeset for help on using the changeset viewer.