Changeset 36104
- Timestamp:
- 2022-03-11T10:34:49+13:00 (2 years ago)
- Location:
- main/trunk/gli/src/org/greenstone/gatherer/remote
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/remote/RemoteGreenstoneServer.java
r34285 r36104 136 136 } 137 137 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 } 138 142 public String moveCollectionFile(String collection_name, File source_collection_file, File target_collection_file) 139 143 { … … 604 608 cgi_args += "&ts=" + System.currentTimeMillis(); 605 609 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 } 607 614 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 } 612 621 } 613 622 -
main/trunk/gli/src/org/greenstone/gatherer/remote/RemoteGreenstoneServerAction.java
r34161 r36104 494 494 /** 495 495 * -------------------------------------------------------------------------------------------- 496 * GET DEFAULT SERVLET PATH // for a remote GS3 497 * -------------------------------------------------------------------------------------------- 498 */ 499 static class GetDefaultServletPathAction 500 extends RemoteGreenstoneServerAction 501 { 502 public GetDefaultServletPathAction() 503 {} 504 505 public void perform() 506 throws Exception 507 { 508 progress_bar.setAction("Getting default servlet ..."); 509 510 String get_script_options_command = "cmd=get-default-servlet-path"; 511 action_output = remote.sendCommandToServer(get_script_options_command, null); 512 } 513 } 514 515 /** 516 * -------------------------------------------------------------------------------------------- 496 517 * MOVE COLLECTION FILE 497 518 * --------------------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.