Hi Mikael,

I have two clients (company A and company B): each company use one interface 
and when the user has to pay, the compnay (A or B) calls my sistem(servlets 
with tomcat and apache). I'd like to distinguish A or B by IP address but 
when I call request.getRemoteAddr() in my servlet I take the user IP 
(browser).

How can I take the IP of server to distinguish between A or B?
How can I use InetAddress?

Thanks

Laura

 

Alle 11:28, venerdì 3 maggio 2002, Mikael Helbo Kjær ha scritto:
> I don't really understand your application (I guess you know that you can
> get the server ip via InetAddress ). Otherwise you are aware that unless it
> is a server side forward or include (instead of a send redirect) then the
> browser is actually your client. More importantly you could add some
> parameter on server-1 to identify to server-2 what it is.
>
> Best regards
> Mikael
>
> > please help me!! I'll explain you my problem.
> >
> > I have a servlet which has to recognize two ip addresses. If
> > the servlet
> > finds that the request is from the IP1 (server1), it sets a
> > shop login
> > variable to xxxxx, else if the request IP is IP2 (server2) it
> > sets the shop
> > login to yyyy.
> > The problem is this: the ecommerce page is on a machine 1
> > while the pay
> > gateway is on the machine2 (my servlets).
> > The user buys something on the machine 1 and when he has to pay he is
> > redirected to my servlet on machine 2.
> >
> > I use this instructions for distinguishing the request IP:
> >
> > String senderIP = request.getRemoteAddr();
> >
> > BUT THIS IS THE HOST IP AND NOT THE IP OF MY SERVER (server1
> > or server2 with
> > two shop login different).

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to