如果客户端是用IE或NETSCAPE就取不到客户端的源IP
因为IE的安全性原理,使得不能取得IP地址

解决方案 »

  1.   

    if you use servlet, use HttpServletRequest.getRemoteAddr() to get it, but if the user use a proxy, you only get the IP address of the proxy server.
      

  2.   

    不过,如果是application 就可以得到
      

  3.   

    好像以前你也贴过这个问题。
    看你那么有诚意就告诉你::)
    InetAddress.getLocalHost().toString();
      

  4.   

    InetAddress.getLocalHost().toString()取出来的还是127.0.0.1
      

  5.   

    如果你用的是Applet就不可能得到客户端的源IP。这是APPLET的限制,你要写策略文件。如果是Application是可以的。
      

  6.   

    你要是用的是APPLET肯定取不到CLIENT的IP,要是能取到,那还谁敢用你的APPLET呀????
      

  7.   

    如果applet不能将ip发到server上,那它们怎么通信呢
    can any one help me, pls?
      

  8.   

    可以发一个数据报给server,server通过数据报的socket判断客户端ip;
    也可以用jsp写网页,因为jsp可以获得ip.
      

  9.   

    还有,我在局域网试的:getDocumentBase().getHost().