Project

General

Profile

Revision 2305

Compose the Metacat URL from the httpserver and the servletpath properties, replacing hard-coded references to servlet.

View differences:

src/edu/ucsb/nceas/metacat/harvesterClient/Harvester.java
876 876
   *                         can run
877 877
   */
878 878
  private void startup(int nHarvests, int maxHarvests) {
879
    String context;
880 879
    Boolean ctm;
881 880
    String httpserver;
882 881
    Integer lp;
883 882
    String metacatURL;
884 883
    Date now = new Date();
884
    String servletPath;
885 885
    
886 886
    timestamp = now.toString();
887 887
    System.out.println(Harvester.marker);
......
912 912
    if (connectToMetacat()) {      
913 913
      try {
914 914
        httpserver = options.getOption("httpserver");
915
        context = options.getOption("context");
916
        metacatURL = httpserver + "/" + context + "/servlet/metacat";
915
        servletPath = options.getOption("servletpath");
916
        metacatURL = httpserver + servletPath;
917 917
        System.out.println("Connecting to Metacat: " + metacatURL);
918 918
        metacat = MetacatFactory.createMetacatConnection(metacatURL);
919 919
      } 

Also available in: Unified diff