cancel
Showing results for 
Search instead for 
Did you mean: 

WDURLGenerator.getAbsoluteWebResourceURL(DeployableObjectPart) deprecated

Former Member
0 Kudos

I'm working on an application in which the following code can be found:


String  absoluteWebResourceUrl = WDURLGenerator.getAbsoluteWebResourceURL(depObjectpart);
String dynamicApplicationUrl      = WDURLGenerator.getDynamicApplicationURL(depObjectpart);
String staticApplicationUrl          = WDURLGenerator.getStaticApplicationURL();

String[] arr_serverUrl = absoluteWebResourceUrl.split("/");
String portalApplicatonUrl = arr_serverUrl[0] + "//" + arr_serverUrl[2];
               
// append rest of application URL
portalApplicatonUrl += staticApplicationUrl + "/" + dynamicApplicationUrl;

This URL, concatenated with a request parameter, is used in some mails that are sent from the application.

But now WDURLGenerator.getAbsoluteWebResourceURL(DeployableObjectPart) has been deprecated. So I'm looking for an alternative to this code. Any ideas?

Thanks,

Lieven

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ...

Try using

WDURLGenerator.getWebResourceURL(DeployableObjectPart);

Regards

Akshaya

Former Member
0 Kudos

In that case, I receive a relative URL:

../../../resources/com.c.b/itprojapp~wd/Applications/com.c.e.proj.app.app.AppName/test

Former Member
0 Kudos

Hi,

Use this:


/**
 *here resourceName is a String which is the name of the resource being looked up. 
 *for example, if the resource is an html file then resourceName parameter should contain
 *the name of the html file
 */
WDURLGenerator.getAbsoluteWebResourceURL(deployableObjectPart, resourceName)

Regards,

Satyajit.

Former Member
0 Kudos

That one has also been deprecated.