- Timestamp:
- 2010-10-29T21:14:42+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/server/Server2Settings.java
r22085 r23251 20 20 protected JRadioButton[] hostRadioButtons = new JRadioButton[4]; 21 21 22 // 0 to 3: 0 is resolve (hostname) from local IP, 1 is local IP address, 2 is localhost, 3 is 127.0.0.122 // 0 to 3: 0 is resolved (hostname) from local IP, 1 is local IP address, 2 is localhost, 3 is 127.0.0.1 23 23 protected int address_resolution_method = 2; 24 24 protected int externalaccess = 0; … … 115 115 // work out the host (default is address_resolution_method 2: localhost) 116 116 String hostIP = "127.0.0.1"; 117 String hosts = ""; 117 118 InetAddress inetAddress = null; 118 119 try { 119 120 inetAddress = InetAddress.getLocalHost(); 121 hosts = inetAddress.getHostName(); 120 122 hostIP = inetAddress.getHostAddress(); // used for all cases unless an Exception is thrown here 121 123 } catch(UnknownHostException e) { … … 123 125 logger.info("Server2.java reload(): Defaulting host URL to localhost"); 124 126 hostIP = "127.0.0.1"; 127 hosts = ""; 125 128 address_resolution_method = 2; 126 129 } 127 130 128 131 newFileLines = scriptReadWrite.replaceOrAddLine(newFileLines, "hostIP", hostIP, true); 132 newFileLines = scriptReadWrite.replaceOrAddLine(newFileLines, "hosts", hosts, true); 129 133 130 134 // address resolution method - onSave() would have updated
Note:
See TracChangeset
for help on using the changeset viewer.