Skip to Content
author's profile photo Former Member
Former Member

Generate URL's for webDynpro applications and public web resources( MIMES)

Hi Colleagues

could anyone please let me know how to generate URL for Webdynpro applications?

i am trying it by using the fiollowing code

WDDeployableObjectPart appPart = WDDeployableObject.getPart(u201CTestu201D,u201CTestAppu201D,WDDeployableObjectPart.APPLICATION);

but here i dont know what exactly need to be passed in the arguments of getPart()...could anyone please explain

String resourcePath = WDURLGenerator.getAbsoluteWebResourceURL(wdComponentAPI.getComponent().getDeployableObjectPart(), resourceName);

and what is to be given here in the resourcename

Thanks a lot in advance

Thanks & Regards

Swetha

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 24, 2009 at 07:21 AM

    Hi,

    To get the application URL use

    WDDeployableObjectPart deployableObjectPart =  wdComponentAPI.getComponent().getDeployableObjectPart();
    	  String appURl = WDURLGenerator.getApplicationURL(deployableObjectPart);
    

    Regards

    Ayyapparaj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Following will help you to get the URL

      Replace "TestComp" with that of yours.

      
      	  String deployableObjectName =  wdComponentAPI.getDeployableObjectPart().getDeployableObjectName();
      
      	  try {
      	  WDDeployableObjectPart deployableObjectPart =  WDDeployableObject.getDeployableObjectPart(
      			  											deployableObjectName, "TestComp",  WDDeployableObjectPartType.APPLICATION);
      
      	  String url = WDURLGenerator.getApplicationURL(deployableObjectPart);
      	   String url1 = WDURLGenerator.getAbsoluteWebResourceURL(deployableObjectPart);
      	  wdComponentAPI.getMessageManager().reportSuccess(url);
      wdComponentAPI.getMessageManager().reportSuccess(url1);
      
      	  }
      	  catch(Exception e)
      	  {
      		  wdComponentAPI.getMessageManager().reportException(e);
      	  }
      

      Regards

      Ayyapparaj

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.