더 이상 고민하지 않고 예제 코드를 참조하십시오
문자열 ip = request.getheader ( "x-forwarded-for"); if (ip == null || ip.length () == 0 || "알 수없는".EqualSEndOreCase (ip)) {ip = request.getheader ( "proxy-client-ip"); } if (ip == null || ip.length () == 0 || "알 수없는".EqualSEndoreCase (ip)) {ip = request.getheader ( "wl-proxy-client-ip"); } if (ip == null || ip.length () == 0 || "알 수없는".EqualSeignoreCase (ip)) {ip = request.getRemoteaddr (); } system.out.println ( "IP :"+IP);위는이 기사의 모든 내용입니다. 이 기사의 내용이 모든 사람의 연구 나 업무에 도움이되기를 바랍니다. 또한 wulin.com을 더 지원하기를 바랍니다!