jsp getting the ip

how can I get the ip of the server from a jsp page? because we will use a server cluster for distributed workload, but I want to use the same server for all subsequent requests from the same session, so I need to get the ip from the jsp page.
[256 byte] By [OniShiroa] at [2007-10-2 20:31:16]
# 1
request.getRemoteAddr();request.getRemoteHost();
Madathil_Prasada at 2007-7-13 23:14:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
thanks, but I think that will give me the ip of the client who sent the request, and that's not what I want.Anyway your tip sent me in the right direction, I think request.getLocalAddr() does what I need.Message was edited by: OniShiro
OniShiroa at 2007-7-13 23:14:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
doesn't work, it gets me the internal ip 127.0.0.1 but I want to know the external one.
OniShiroa at 2007-7-13 23:14:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

Yes, that would get you the ip of the browser machine. Dint read your post fully.

I dont know if you can programatically read the ip of the machine on which your server's running. You'll have to set up your own property file where you go in and provide the system ip before starting the server on the machine. A program can then read in this value. This makes the process configurable.

ram.

Madathil_Prasada at 2007-7-13 23:14:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
request.getLocalAddr() returns the host ip. Alternatively you can make the property available as a system property to java in your servers startup script.Niklas
Niklasa at 2007-7-13 23:14:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...