cancel
Showing results for 
Search instead for 
Did you mean: 

Get path of alias in HTTP Provider of VA

Former Member
0 Kudos

Hi,

I have defined an alias name for a directory path in the server using the HTTP Provider->alias in Visual Administrator. From the web dynpro (java) application, I have to get the path by giving only the alias name. Can anyone help with the code snippet for this? Also tell how to get the IP/hostname and port of the server through coding.

Srinivasan T.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

srinivasan,

You can get the HostName using the following code snippet:

InetAddress iNetAdd = InetAddress.getLocalHost();
String hostName = iNetAdd.getHostAddress();

Use

WDURLGenerator.getAbsoluteWebResourceURL(deployableObjectPart);

to get the complete URI of the application and then you just extract the "port" number from it.

~Bala

Former Member
0 Kudos

Hi,

Thanks. But using that I can get only the hostname/port. The important one is that I want to get from the HTTP Provider of Visual Admn the path, by using the 'alias' for the path in the code.

Srinivasan T

Answers (0)