Click here to Skip to main content
15,910,123 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
private static String getRemortIP(HttpServletRequest requestContext) {
String ipAddr= requestContext != null ? requestContext.getRemoteAddr() : "InvalidIP";
if("127.0.0.1".equals(ipAddr)) ipAddr= requestContext.getHeader("X-Forwarded-For");
return myIP != null ? ipAddr: "BadForwardedIP";
}
Posted
Comments
OriginalGriff 20-Jan-14 6:47am    
And?
Your question is?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900