Changeset 18131
- Timestamp:
- 2008-12-05T18:13:28+13:00 (14 years ago)
- Location:
- gli/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/classes/dictionary.properties
r17264 r18131 836 836 MissingEXEC.Title:Missing Greenstone Library Address 837 837 #***** Missing EXEC_GS3 ***** 838 MissingEXEC_GS3.Message: Warning! You will not be able to view your new collections within the Librarian Interface unless you specify the path to the Greenstone context in the locally running Tomcat Webserver. You can enter this now in the text field below, or later by going to Preferences and choosing the Connection tab. Remember that a valid url must start with the protocol "http://". The default address is http://localhost:8080/greenstone3.839 MissingEXEC_GS3.Title: Missing Greenstone 3 Library Address838 MissingEXEC_GS3.Message:Please enter the Greenstone 3 library URL. You will not be able to view your new collections within the Librarian Interface unless you specify the path to the Greenstone context in the locally running Tomcat Webserver. You can enter this now in the text field below, or later by going to Preferences and choosing the Connection tab. Remember that a valid URL must start with the protocol "http://". 839 MissingEXEC_GS3.Title:Greenstone 3 Library URL 840 840 #***** Missing GLIServer ***** 841 841 MissingGLIServer.Message:Enter the address of the remote Greenstone "gliserver.pl" script in the text field below. Remember that a valid URL must start with the protocol "http://" and end with "gliserver". -
gli/trunk/src/org/greenstone/gatherer/Gatherer.java
r17628 r18131 821 821 822 822 if (GS3) { 823 dialog = new WarningDialog("warning.MissingEXEC", Dictionary.get("MissingEXEC_GS3.Title"), Dictionary.get("MissingEXEC_GS3.Message"), configPropertyName, false); 823 // Warning dialog with no cancel button and no "turn off warning" checkbox 824 dialog = new WarningDialog("warning.MissingEXEC", Dictionary.get("MissingEXEC_GS3.Title"), Dictionary.get("MissingEXEC_GS3.Message"), configPropertyName, false, false); 824 825 } else { // local case 825 826 dialog = new WarningDialog("warning.MissingEXEC", Dictionary.get("MissingEXEC.Title"), Dictionary.get("MissingEXEC.Message"), configPropertyName, false); 826 827 } 827 828 828 dialog.setValueField(new URLField.Text(Configuration.getColor("coloring.editable_foreground", false), Configuration.getColor("coloring.editable_background", false))); 829 JTextField field = new URLField.Text(Configuration.getColor("coloring.editable_foreground", false), Configuration.getColor("coloring.editable_background", false)); 830 831 // Set the default library URL to the tomcat server and port number 832 // specified in the build.properties located in the gsdl3_src_path 833 if (GS3) { 834 String host = "localhost"; 835 String port = "8080"; 836 837 File buildPropsFile = new File(Configuration.gsdl3_src_path + File.separator + "build.properties"); 838 if(buildPropsFile.exists()) { 839 Properties props = new Properties(); 840 try{ 841 props.load(new FileInputStream(buildPropsFile)); 842 host = props.getProperty("tomcat.server", host); 843 port = props.getProperty("tomcat.port", port); 844 }catch(Exception e){ 845 DebugStream.println("Could not load build.properties file"); 846 System.err.println("Could not load build.properties file"); 847 } 848 props = null; 849 } 850 String defaultURL = "http://"+host+":"+port+"/"+"greenstone3/library"; 851 field.setText(defaultURL); 852 field.selectAll(); 853 } 854 dialog.setValueField(field); 829 855 dialog.display(); 830 856 dialog.dispose(); … … 834 860 if (!library_url_string.equals("")) { 835 861 try { 862 // WarningDialog does not allow invalid URLs, so the following is ignored: 863 // make sure the URL the user provided contains the http:// prefix 864 // and then save the corrected URL 865 if(!library_url_string.startsWith("http://") 866 && !library_url_string.startsWith("https://")) { 867 library_url_string = "http://"+library_url_string; 868 Configuration.setString(configPropertyName, true, configPropertyName); 869 } 836 870 Configuration.library_url = new URL(library_url_string); 837 871 } … … 864 898 865 899 boolean showLogin = true; 866 867 900 do { 868 901 if(!dialog.loginRequested()) { // user pressed cancel to exit the FedoraLogin dialog
Note:
See TracChangeset
for help on using the changeset viewer.