I'm using request.getRemoteAddr() in my servlet and it returns "127.0.0.1" to me, not the actual IP address. I need tha actual IP address. I'm accessing the Servlet from the same machine where the J2EE server is running. Could anyone please tell me what the problem is?
This trick is handy when testing IP-specific code. We had specific code for Kiosks running on fixed addresses. If you register one IP in your app then you can send requets and test the code works correctly.