Skip to Content
Mar 13, 2007 at 01:37 PM

Correct way of getting Portal server name & port


Hi All,

I've an application in which I have to get the portal server name & port dynamically.

'getAbsoluteWebResourceURL' is deprecated.

InetAddress n=InetAddress.getLocalHost();

String name=n.getHostName()

will get me server name only

Using 'TaskBinder' is not recommended(Hijacking WD classes/interfaces)

Getting SLD server name & port will not work in my case since my SLD server is not my portal server.

Saving the server in .properties file in 'Configuration Adapter' is not good also because I am using load balancing system and I need the server that I'm currently working on.

The question's regarding NW2004 SP14/15/16/17

So what is the correct way of getting portal server name & port?