cancel
Showing results for 
Search instead for 
Did you mean: 

how to get host name

junwu
Active Contributor
0 Kudos

Hi Gurus,

in webdynpro, I upload a file to KM, i try to get the full url of the uploaded file, i can only get url like this /irj/go/km/docs/documents/****

which api can i use to get the server name or cluster name, port,

customer server has cluster http:// dep.domain.name/

one of its instance my instance1 http://instance1.domain.name

my environment is NW04 SP19.

Best regards,

John

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

try

{

InetAddress n=InetAddress.getLocalHost();

String name=n.getHostName();

}

catch(Exception e)

{

wdComponentAPI.getMessageManager().reportException("component"+e.getMessage(),true);

}

Regards,

Murtuza

junwu
Active Contributor
0 Kudos

Hi Murtuza,

thanks for your great code.

I can get the server name.

but how can i get the port?

Best regards,

John

Former Member
0 Kudos

Hi,

Have a look at these threads

Regards,

Saravanan K

Answers (0)