Skip to Content
avatar image
Former Member

How to get the current webdynpro application url


I have a requirement to get current webdynpro application url, as I need to pass that as POST method to external website.

Please suggest.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jun 04, 2010 at 02:25 PM
    try {
    	// Get name of deployable object this component belongs to
    	String deployableObjectName = "";
    	deployableObjectName = wdComponentAPI.getDeployableObjectPart().getDeployableObjectName();
    	//Map urlParameters = new HashMap();
    	// get URL parameter value entered by user, stored in context attribute
    	// ?UrlParamValue?. Put parameter ?hugo? in the sneak preview version.
    	//urlParameters.put("", "");
    	// Get deployable object part of target application.
    	// Precondition: assume, that other application belongs to the same
    	// Web Dynpro Project (Deployable Object)
    	WDDeployableObjectPart deployableObjectPart = WDDeployableObject.getDeployableObjectPart(deployableObjectName, wdContext.currentVnAppPropertiesElement().getVaAppName(), WDDeployableObjectPartType.APPLICATION);
    	String clientHostAddress = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getClientHostAddress().trim();
    	String clientHostName = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getClientHostName().trim();
    	String serverHostName = TaskBinder.getCurrentTask().getProtocolAdapter().getServerName().trim();
    	if (serverHostName.indexOf(".") != -1)
    		serverHostName = serverHostName.substring(0, serverHostName.indexOf("."));
    	int serverPort = TaskBinder.getCurrentTask().getProtocolAdapter().getServerPort();
    	// Get target URL based on deployable object part and URL parameters
    	String urlToTargetApp = "http://" + serverHostName + "" + serverPort + WDURLGenerator.getStaticApplicationURL() + "/" + WDURLGenerator.getDynamicApplicationURL(deployableObjectPart);
    } catch (WDURLException e) {
    	this.messManagerShowMessage(e.getLocalizedMessage(), PBMessagesTypes.TP_StackTrace, e, myLogger);
    } catch (WDDeploymentException ex) {
    	this.messManagerShowMessage(ex.getLocalizedMessage(), PBMessagesTypes.TP_StackTrace, ex, myLogger);



    Edited by: Angelo Antonello Borges on Jun 4, 2010 11:27 AM

    Edited by: Angelo Antonello Borges on Jun 4, 2010 11:28 AM

    Add comment
    10|10000 characters needed characters exceeded

    • >

      > Your question is in the wrong forum then! Should have been posted in the forum for Portal!

      > In any case ... you need to create an alias for your iview in Portal:






      > Would recommend that you apply SSO with Active Directory so that your portal does not request login.


      > /people/holger.bruchelt/blog/2008/10/06/single-sign-on-to-bsp-pages-from-duets-action-pane



      > regards,

      > Angelo

      You need to create a short URL for your application in the Portal iView ... and instead of using the url of the application webdynpro, use this short url created.

  • avatar image
    Former Member
    Jun 16, 2010 at 08:59 PM


    Add comment
    10|10000 characters needed characters exceeded