Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Code to fetch out IP of EP user

Hi all

I want to make an application in web deynpro . Requirement is like , I want to capture IP of machine from which user logs into portal fro security reasons.

I have tried following java code to fetch IP of machine . Its working fine in development and Quality but not in production. In dev and QA its giving IP of machine but due to revese proxy settings in the production sever its fetching IP of portal instead of IP of machine.

import com.sap.tc.webdynpro.services.sal.adapter.api.WDProtocolAdapter;

String ipAddress = WDProtocolAdapter

.getProtocolAdapter()

.getRequestObject()

.getClientHostAddress();

any suggestions are appriciated

Regards

Abhay

Former Member
Not what you were looking for? View more on this topic or Ask a question