如何从servlet中获取客户端ip并转换ip为long值

转自:http://www.zuidaima.com/share/1550463555816448.htm html 最简单的方式是经过HttpServletRequest.getRemoteAddr()的方法获得,但对于代理的服务器须要特殊的方法,另外若是在hosts文件C:\Windows\System32\drivers\etc\hosts中没有指定 127.0.0.1 localhost
相关文章
相关标签/搜索