InetSocketAddress addr = (InetSocketAddress) request.getRemoteSocketAddress(); if (addr != null) System.out.println("Connection from: " + addr.getAddress().getCanonicalHostName());
    public void run() {                for (int i = 0; i < numThreads; i++) {            Thread t = new Thread(                                  new RequestProcessor(documentRootDirectory,                                                       indexFileName,                                                       servletNamed));            t.start();        }        System.out.println("Accepting connections on port "                            + server.getLocalPort());        System.out.println("Document Root: " + documentRootDirectory);        while (true) {            try {                Socket request = server.accept();                RequestProcessor.processRequest(request);            }            catch (IOException e) {             }        }            }