tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Øyvind Vestavik <>
Subject Re: Help me: URGENT!!!
Date Fri, 03 May 2002 10:06:22 GMT

I'm no expert, but in the request from the e-commerce server you could set
an additional parameter with the IP of this that machine, something like

Then you could retrieve this attribute in the servlet on the payment
gateway with
String ip = request.getAtttribute("requestingServer");

That is if you can modify things on the e-commerce server..

Maybee there is a better way, but I don't see it straight away..

Øyvind Vestavik
Øvre Møllenberggt 44b
7014 Trondheim

On Fri, 3 May 2002, Laura wrote:

> Hi all,
> 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).
> How can I know the request ip of my server?
> Please help me!!!!!
> Thanks for your help
> Laura
> --
> To unsubscribe:   <>
> For additional commands: <>
> Troubles with the list: <>

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message