Changeset 6130
- Timestamp:
- 2003-12-05T12:24:04+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Gatherer.java
r5911 r6130 34 34 **************************************************************************************/ 35 35 36 import calpa.html.*;37 36 import com.l2fprod.gui.*; 38 37 import com.l2fprod.gui.plaf.skin.*; … … 124 123 private GSDLSiteConfig gsdlsite_cfg = null; 125 124 private ExternalApplication server = null; 126 private CalHTMLPane view = null;127 125 128 126 /** The name of the Gatherers configuration file. */ … … 288 286 g_man.display(); 289 287 290 // set up the calpane to use for config server291 CalHTMLPreferences prefs = new CalHTMLPreferences();292 DefaultCalHTMLObserver observer = new DefaultCalHTMLObserver();293 view = new CalHTMLPane(prefs, observer, "Default");294 295 288 // Place the window in the desired location on the screen, if this is do-able (not under most linux window managers apparently. In fact you're lucky if they listen to any of your screen size requests). 296 289 g_man.setLocation(bounds.x, bounds.y); … … 383 376 384 377 try { 385 String url = config.exec_address.toString() + command; 386 ///ystem.err.println("Action: " + url); 387 view.setLoadSynchronously(true); 388 view.showHTMLDocument(new URL(url)); 389 view.setLoadSynchronously(false); 390 ///ystem.err.println("Complete."); 378 String raw_url = config.exec_address.toString() + command; 379 URL url = new URL(raw_url); 380 Gatherer.println("Action: " + raw_url); 381 HttpURLConnection library_connection = (HttpURLConnection) url.openConnection(); 382 int response_code = library_connection.getResponseCode(); 383 if(HttpURLConnection.HTTP_OK <= response_code && response_code < HttpURLConnection.HTTP_MULT_CHOICE) { 384 Gatherer.println("200 - Complete."); 385 } 386 else { 387 Gatherer.println("404 - Failed."); 388 } 391 389 url = null; 392 390 } 393 catch(Exception error) { 391 catch(Exception exception) { 392 Gatherer.printStackTrace(exception); 394 393 ///ystem.err.println("Bad URL."); 395 394 } … … 836 835 if(gsdlsite_cfg.getURL() != null) { 837 836 // Send the command for it to exit. 838 //Gatherer.g_man.preview_pane.configServer(GSDLSiteConfig.QUIT_COMMAND);839 837 configServer(GSDLSiteConfig.QUIT_COMMAND); 840 838 // Wait until it exits.
Note:
See TracChangeset
for help on using the changeset viewer.