- ClassLoader cl = getClassLoader();
- if (cl == null) return;
- Class c = cl.loadClass("Main");
- if (c == null) return;
- Method m = c.getMethod("main", new Class[] { });
- m.invoke(null, new Object[] { });
- } catch (Exception e) {
- Log.warn(this, "nope");
+ Log.warn(Host.class, "resolving " + host);
+ InetAddress addr = InetAddress.getByName(host);
+
+ /*
+ boolean good = false;
+ try {
+ if (NetworkInterface.getByInetAddress(addr) != null) good = true;
+ if (!good) Log.warn(Host.class, "host " + host + "resolves to " + addr + " which is not local");
+ } catch (Exception e) {
+ Log.warn(Host.class, "host " + host + "resolves to " + addr + " which is not local because:");
+ Log.warn(Host.class, e);
+ }
+ if (!good) return;
+ */
+
+ if (new File(path + File.separatorChar + "WEB-INF").exists()) {
+ String pad = "";
+ while(pad.length() + host.length() < 30) pad += " ";
+ Log.info(Main.class, pad + host + " => " + path);
+ hosts.put(host, pcl = new Host(path, host, pcl));
+ if (!"ibex.org".equals(host)) return;
+ }
+ } catch (UnknownHostException e) {
+ if (depth >= 3) return;