cancel
Showing results for 
Search instead for 
Did you mean: 

Get Client Host Name

former_member599943
Participant
0 Kudos

Dear Experts,

I am using

String ipAddress = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getClientHostAddress();

retrieve client ip address.

When I use getClientHostName(), it still present client ip address.

Regarding the client hostname, how do I get it?

thank you.

Regards,

Weng

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member192434
Active Contributor
0 Kudos

Use this

String hostName = WDProtocolAdapter.getProtocolAdapter().

getRequestObject().getClientHostName();

You also have one more method to get IP address.

String Address = WDProtocolAdapter.getProtocolAdapter().

getRequestObject().getClientHostAddress() ;

for more check this forum link

thanks

former_member599943
Participant
0 Kudos

Thanks,

But I will get ip address when using

String hostName = WDProtocolAdapter.getProtocolAdapter().

getRequestObject().getClientHostName();

Regards,

Weng

former_member599943
Participant
0 Kudos

Thanks,

But it will return ip address when using

String hostName = WDProtocolAdapter.getProtocolAdapter().

getRequestObject().getClientHostName();

Regards,

Weng

former_member192434
Active Contributor
0 Kudos

Hi

Programatically it returns HostName when you use the above code....

there is strong chance the client HostName and IP address might be same. ...

just check it out.

You can use this code as well to get the id or Name

String sid = System.getProperty("SAPSYSTEMNAME");

Thanks

AB

Former Member
0 Kudos

Hi,

Even i feel that both the host name and host address are the same.

regards,

Jithin

former_member599943
Participant
0 Kudos

Dear AB,

I was tried String sid = System.getProperty("SAPSYSTEMNAME"), but it only retrieve server side hostname.

Dear Jithin,

Actually there are different.

Thank you.

Regards,

Weng