Changeset 36105
- Timestamp:
- 2022-03-11T10:38:01+13:00 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java
r36094 r36105 380 380 381 381 int greenstoneVersion = 2; 382 requestGLIServerURL(); 382 String prev_gliserver_url_string = Configuration.getString("general.gliserver_url", true); 383 requestGLIServerURL(); // opens up the gliserver dialog 383 384 gliserver_url_string = Configuration.gliserver_url.toString(); 385 384 386 385 387 greenstoneVersion = remoteGreenstoneServer.getGreenstoneVersion(); … … 391 393 if(greenstoneVersion >= 3) { 392 394 this.GS3 = true; 393 Configuration.prepareForGS3(); 395 if (!prev_gliserver_url_string.equals(gliserver_url_string)) { 396 System.err.println("Using a new GLI server url, clear site and servlet info"); 397 Configuration.setSiteAndServlet("", ""); 398 } else { 399 Configuration.prepareForGS3(); 400 } 394 401 } 395 402 … … 494 501 495 502 // The "-gliserver_url" option overwrites anything in the config files 503 // why do this? we have already asked the user for gliserver url and set it... 496 504 if (gliserver_url_string != null && gliserver_url_string.length() > 0) { 497 505 try { … … 514 522 servlet_config= new ServletConfiguration(gsdl3_path); 515 523 } 516 } 517 518 if (GS3 && Configuration.servlet_path == null) { 519 Configuration.servlet_path = servlet_config.getServletPath(Configuration.site_name); 524 525 526 if (Configuration.servlet_path == null || Configuration.servlet_path.equals("")) { 527 if (isGsdlRemote) { 528 System.err.println("servlet path is null, get new one from remote server"); 529 String my_servlet_path = remoteGreenstoneServer.getDefaultServletPath().trim(); 530 // set site name to match 531 String my_site_name = servlet_config.getSiteForServlet(my_servlet_path); 532 533 Configuration.setSiteAndServlet(my_site_name, my_servlet_path); 534 } else { 535 // TODO - how do we work out default in local case? 536 Configuration.servlet_path = servlet_config.getServletPath(Configuration.site_name); 537 } 538 } 520 539 } 521 540 … … 1406 1425 WarningDialog dialog; 1407 1426 String[] defaultURLs = { 1408 "http://localhost:8 080/greenstone3/cgi-bin/gliserver.pl",1427 "http://localhost:8383/greenstone3/cgi-bin/gliserver.pl", 1409 1428 "http://localhost:8080/gsdl/cgi-bin/gliserver.pl" 1410 1429 };
Note:
See TracChangeset
for help on using the changeset viewer.