TO  gary_shi(Gary Shi) 
 那至少我在局域网中的名字总可以吧.

解决方案 »

  1.   

    java.net.InetAddress address = InetAddress.getByName(host或ip);
    out.println(address);
      

  2.   

    Sorry!上面的错了
    java.net.InetAddress address = InetAddress.getByName(host);
    out.println(address.getHostName());
      

  3.   

    TO aleccheung(不能让自己再堕落了)
    其实 request.getRemoteHost() 就可以的.你的方法我之前也试过.我想应该是不能解析的原因.