cancel
Showing results for 
Search instead for 
Did you mean: 

how to read the Domain and Port of our server

vivekananthan_sellavel
Active Participant
0 Kudos

hi guru,

Is there any method to get the portal Domain and Port .

http://<domain>:<port>/irj/portal

http://<Domain><port>; /irj/servlet/prt/portal/prtroot/com.sap.portal.appintegrator.sap.bwc.Transaction?System=NIB_Aliase&SAP_TCode=se80

in our project we are hard coded the Domain and port .

if we transfer the application is some other server again we want to change.

So is there any solution for that.Please help me in this situation

Advance thank's

Regard's

Vivekanathan.S

Accepted Solutions (0)

Answers (2)

Answers (2)

nikhil_bose
Active Contributor
0 Kudos

WDSystemLandscape.getSLDHost() ;

WDSystemLandscape.getSLDPort() ;

[WDSystemLandscape|http://help.sap.com/javadocs/NW04/current/wd/com/sap/tc/webdynpro/services/sal/sl/api/WDSystemLandscape.html]

nikhil

Former Member
0 Kudos

Hi,

import com.sap.tc.webdynpro.services.sal.deployment.api.WDDeployableObjectPart;

import com.sap.tc.webdynpro.services.task.TaskBinder;

WDDeployableObjectPart d = wdComponentAPI.getDeployableObjectPart();

String hostName = TaskBinder.getCurrentTask().getProtocolAdapter().getServerName();

int port = TaskBinder.getCurrentTask().getProtocolAdapter().getServerPort();

* *

With the above code you can get the host name, and port.

If your problem is solved, award me the points.

Thanks,

Srini