remote address and and display the correct link

Hi I use a dynamic include for my top "header" (by header, I mean many urls that pertain to either internal or external users) of my web page, and I use

String agent = request.getRemoteAddr();

......

to get either a intranet header or internet header dynamaically,

but, if inside the body I have a link that if a person decides to click it can go to either internet or genet users when it is clicked depending on their getRemoteAddr();

What would be the best way to do this?

[521 byte] By [sarumii] at [2007-9-26 2:00:20]
# 1

Hi,

Even i am using the 'request.getRemoteAddr()' method to retrieve the IP of the client who hits my web page, but in some other context.

My prob is that this method does not give me the IP of the actual client, instead it returns the IP of the gateway (in case it is there), or if the client is connected to a dialup internet connection, the method returns the IP of the connection provider.

To make things more clear, i have a web page which a client visits. the client is connected to the internet using dialup connection. i want the IP of the client's system, and not the IP of the internet provider's server, which is what request.getRemoteAddr() is returning.

How to get the IP of the actual client system?

Any ideas anyone...

Was just wondering if ur also facing the same prob when users from outside (ie, from the internet) are hitting ur site...

filtertipped at 2007-6-29 3:20:49 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...