cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the Portal URL in the code

Former Member
0 Kudos

Hi All,

Is it possible to get the URL of the Enterprise Portal (http://<host>:<port>/irj/portal) in the web dynpro code?

Actaully i am sending mails from my application to various users and need to include the URL of the Enterprise Portal in the mail.

How to go with this? Any ideas?

Thanks,

Venkat

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If you build the mail message from your dynpro application than you can use this code to get the server name and port:


String hostName = TaskBinder.getCurrentTask().getProtocolAdapter().getServerName();
int port = TaskBinder.getCurrentTask().getProtocolAdapter().getServerPort();
String url = "http://" + hostName + ":" + port + "/irj/portal";

Hope it helps,

Roy

Former Member
0 Kudos

Hi Roy Cohen,

This is what i wanted... You straight away gave the code. Thank you very much, it worked.

Regards,

Venkat

Answers (0)