cancel
Showing results for 
Search instead for 
Did you mean: 

Fetch current webdynpro java application QuickLink url

former_member261631
Participant
0 Kudos

Hi Experts,

I am having one requirement of fetching / reading the current webdynpro application url and providing the same to other application as url link.

IWDRequest url = WDProtocolAdapter.getProtocolAdapter().getRequestObject();

wdComponentAPI.getMessageManager().reportSuccess("Hi...."+url);


try {


String temp = WDURLGenerator.getAbsoluteWebResourceURL(wdThis.wdGetAPI().getComponent().getApplication().getDeployableObjectPart());


wdComponentAPI.getMessageManager().reportSuccess(""+temp);

}

catch (WDURLException e) {}

But, the link shows me the pcd link of the application. Whereas I want to read the Quicklink application url of the application like forexample:

http://<Portal-hostname>:<portNumber>/irj/portal/<quick-link-application-Name>

Regards,

Hanif

Accepted Solutions (1)

Accepted Solutions (1)

former_member191044
Active Contributor
0 Kudos

Hi Hanif,

haven't tryed it yet but this should return the app url according to the javadoc:

WDURLGenerator.getApplicationURL(wdComponentAPI.getApplication().getDeployableObjectPart());

Best Regards,

Tobias

former_member261631
Participant
0 Kudos

Hi Tobias,

Thanks for the reply..

I have used following method to display the application url:

WDURLGenerator.getAbsoluteWebResourceURL(wdComponentAPI.getApplication().getDeployableObjectPart());

The method getAbsoluteWebResourceURL() is deprecated, but still gives the application url.

But this url is the pcd url of the webdynpro application and not the portal quicklink url:

http://jiql313.md-man.biz:51300/webdynpro/resources/demo.sap.com/site.geturl/Applications/com.sap.de...

My requirement is to read following url:

http://jiql313.md-man.biz:51300/irj/portal/SITEgeturl?sap-language="EN"&sap-client="300"&XLIFNR=''0000000025"

Here, the important paramters for me to read are the url paramters after ? (question mark).

Regards,

Hanif

former_member191044
Active Contributor
0 Kudos

You can use this for the whole query string (everything after the question mark):

--> WDProtocolAdapter.getProtocolAdapter().getRequestObject().getQueryString();

or you can use this to get the parameter map which includes key and value of all params:

-->

WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameterMap();

Hope this helps.

Tobias

Answers (0)