Hi Laura ! Perhaps I completely misunderstand your problem.
On Fri, May 03, 2002 at 11:17:48AM +0200, Laura wrote: > 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. If the customer is REDIRECTED to server2 then there should be a different instance of your servlet, right ? You have two servers running the same Servlet which shall behave different according to different servers they are running on ? Either I do not understand or your design is somewhat strange... You can get the server-name from the request-object : request.getServerName(); I think this is what you wanted. It is the server-name of the server who received the address. You can then get the ip-address with as dns-query. -- -Christian -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>
