i want to get server actual name and ip address in jsp . when i do
request.getServerName()
it returns me localhost. But i dont want name as localhost but actual name of machine (like in my case it is IBV-0076). Is there a way i can get Ip address also of server which is processing the request?
When i do request.getLocalAddr() i get address as 0.0.0.0 but my server ip is 10.253.18.76
I would use
NetworkInterfacesto obtain information about servers configured interfaces. See Oracle What Is a NetworkInterface?