Ignore:
Timestamp:
2022-03-11T10:34:49+13:00 (2 years ago)
Author:
kjdon
Message:

added some handling around getting the default servlet path from gliserver. no longer want to assume library

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/remote/RemoteGreenstoneServer.java

    r34285 r36104  
    136136    }
    137137
     138    // get the default servlet path from the server -- for a remote GLI of GS3
     139    public String getDefaultServletPath() {
     140    return performAction(new RemoteGreenstoneServerAction.GetDefaultServletPathAction());
     141    }
    138142    public String moveCollectionFile(String collection_name, File source_collection_file, File target_collection_file)
    139143    {
     
    604608    cgi_args += "&ts=" + System.currentTimeMillis();
    605609    if (Gatherer.GS3){
    606         cgi_args += "&site=" + Configuration.site_name;
     610        String site_name = Configuration.site_name;
     611        if (site_name != null && !site_name.equals("")) {
     612        cgi_args += "&site=" + Configuration.site_name;
     613        }
    607614        String library_servlet_name = Configuration.servlet_path;
    608         if (library_servlet_name.charAt(0) == '/') {
    609         library_servlet_name = library_servlet_name.substring(1);
    610         }
    611         cgi_args += "&servlet=" + library_servlet_name;
     615        if (library_servlet_name != null && !library_servlet_name.equals("")) {
     616        if (library_servlet_name.charAt(0) == '/') {
     617            library_servlet_name = library_servlet_name.substring(1);
     618        }
     619        cgi_args += "&servlet=" + library_servlet_name;
     620        }
    612621    }
    613622
Note: See TracChangeset for help on using the changeset viewer.