Hi , I have a machine with multihomed interface . basically , I am making call where both the server and client are same machine . Here , I am trying to validate the IPaddress from the request with InetAddress.getLocalHost () . Since ,both the client and server are same machine . I expects httpservletrequest.getRemoteAddr() should be equals InetAddress.getLocalHost().getHostAddress();But Its not the case ..
i.e ; In my multihomed machine : IPaddress of interface hme0 is : x.x.x.17 and IPaddress of interface hme0:1 is :x.x.x.18 Hostname of the machine is mapped to x.x.x.18 . Here , request.getRemoteAddr() returns x.x.x.17 ,whereas netAddress.getLocalHost().getHostAddress() returns x.x.x.18 . I feels request.getRemoteAddr() should also return x.x.x.18 . Can someone helps me out , whats the problem here ?? , Is machine problem / Tomcat problem ?? . I am having Tomcat version 4.1.31 Also , I have similar configuration on other machine ,but there it is working fine . Thanks in Advance . Mani