Changeset 4706


Ignore:
Timestamp:
2003-06-18T12:00:12+12:00 (21 years ago)
Author:
kjdon
Message:

no longer use ConfigVars, use a HashMap instead

File:
1 edited

Legend:

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

    r3503 r4706  
    2626import java.io.File;
    2727import java.io.IOException;
     28import java.util.HashMap;
    2829/**
    2930 * A program to take XML cgi-input from the command line and return html
     
    4243    }
    4344
    44     ConfigVars config_ = new ConfigVars();
    45     config_.gsdl3_home_ = args[0];
    46     config_.site_name_ = args[1];
    47     config_.interface_name_ = args[2];
    48 
    49     config_.createXML();
    50    
     45    HashMap config_params = new HashMap();
     46    config_params.put(GSConstants.GSDL3_HOME, args[0]);
     47    config_params.put(GSConstants.SITE_NAME, args[1]);
     48    config_params.put(GSConstants.INTERFACE_NAME, args[2]);
    5149    // new message router - create it and pass a handle to recept.
    5250    // the servlet wont use this directly
    5351    MessageRouter message_router_ = new MessageRouter();
    5452   
    55     message_router_.setSiteHome(GSFile.siteHome(config_.gsdl3_home_,
    56                             config_.site_name_));
     53    message_router_.setSiteHome(GSFile.siteHome(args[0], args[1]));
    5754    message_router_.configure();
    5855    // new receptionist
    5956    Receptionist recept_ = new Receptionist();
    60     recept_.setConfigVars(config_);
     57    recept_.setConfigParams(config_params);
    6158    recept_.setMessageRouter(message_router_);
    6259    recept_.configure();
     
    7067        query = br.readLine();
    7168        } catch (Exception e) {
    72         System.err.println("Library1 exception:"+e.getMessage());
     69        System.err.println("Library2 exception:"+e.getMessage());
    7370        }
    7471        if (query.startsWith("exit")) {
Note: See TracChangeset for help on using the changeset viewer.