Skip to Content
Feb 05, 2016 at 10:43 AM

IP address issue when deployed in SAP HCP


Hello everyone,

I have a JAVA Servlet project developed using Tomcat 7.

My projects logic is that whenever a request comes from certain IP it responds to the same IP with a new instance of browser as an response.

When I run and test this application locally it works perfect and by the way my local working IP address will be something like this So request has and response is given to and all happies

Now things looks perfect and I planned to deploy this project in a Server which has an IP addess of and I have completed deployment of the same.

Now the issue which I am facing is that when I try to make a request to the project in the server ( from my network (

In my project I have code like

String ip = request.getRemoteAddr(); //gets request IP address to give a new instance of browser

Now the variable **ip** contains an IP address of So my code will try to give a browser instance to which doesn't exist. It should ideally give the browser instance back to as this is from which it had received the request so it has to respond to this IP.

I know both Server and the client request are in different network but I would like to know all possible solutions to fix the same so that browser is given back to

Any help highly appreciated.