如何從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
相關文章
相關標籤/搜索