How can I get my application Context Path?

How can I get my application Context Path via webdynpro code?
Let say I'm accesing my application with URL
https://myapp:8443/webdynpro/dispatcher/local/MyApp/App, how can I get
the value 'https://myapp:8443' from webdynpro code? In J2EE, this is
equivalent of HttpServletRequest.getContextPath() method. Do we have
this method call in webdynpro object?

Hi John,
Yes you can achieve that in Web Dynpro.
Try the following -
// USE THIS FOR GETTING THE SERVER NAME AND IMPORT WEBLOGIC.JAR FILE IN THE JAVA BUILD PATH PROPERTIES
HttpServletRequest request = (( com.sap.tc.webdynpro.services.sal.adapter.core.IWebContextAdapter) WDWebContextAdapter.getWebContextAdapter()).getHttpServletRequest();
//GETS THE HOST NAME OF THE SERVER
String strHostName = request.getServerName();
Thanks,
Sam

Similar Messages

  • How can i get the document full path in S_TieDocument?

    I create a new S_TieDocument and override 2 methods:
    extendedPreInsert and extendedPostInsert
    how can i get the document full path in these 2 methods?
    (e.g. if i use the system user to upload a new file named 'test.file' in system root path /home/system, and i want to get the document full path '/home/system/test.file', how to get it?
    anybody know it, pls tell me, thanks a lot.
    java source is as below
    package oracle.ifs.server;
    import oracle.ifs.beans.Document;
    import oracle.ifs.beans.DocumentDefinition;
    import oracle.ifs.beans.LibraryObjectDefinition;
    import oracle.ifs.beans.LibrarySession;
    import oracle.ifs.beans.PublicObject;
    import oracle.ifs.common.AttributeValue;
    import oracle.ifs.common.IfsException;
    import oracle.ord.itech.cmsdk.ws.view.EmbeddedCMSDKWebServicesWSStub;
    public class S_TieDocument extends S_Document
    public S_TieDocument(S_LibrarySession session, S_LibraryObjectData data)
    throws IfsException
    super(session, data);
    public S_TieDocument(S_LibrarySession session, java.lang.Long classID)
    throws IfsException
    super(session, classID);
    // Overrides
    public void extendedPreInsert(OperationState opState,
    S_LibraryObjectDefinition def)
    throws IfsException
    // Always call super
    super.extendedPreInsert(opState, def);
    // Get the LibrarySession
    S_LibrarySession session = getSession();
    def.setUserSetAttribute("CUSTOMATTRIBUTE",
    AttributeValue.newAttributeValue(""));
    //how can i get the document file full path here?
    public void extendedPostInsert(OperationState opState,
    S_LibraryObjectDefinition def)
    throws IfsException
    // Get the LibrarySession
    S_LibrarySession session = getSession();
    //how can i get the document file full path here?
    }

    In the new version of Numbers this option is not available.  You will have to type the file name into the header yourself.  You can post feedback to Apple using the menu item "Numbers > Provide Numbers Feedback"
    or use Numbers2.3 which should be in the folder "/Applications/iWork '09" if you previously had it installed

  • I have installed Adobe packages and cannot find the Acrobat extension folder please advise how can I get these applications to load onto my computer?

    I have installed Adobe Creative Cloud for teams CC Packages which says that Acrobat XI Pro is installed. Your support page says it does not install Acrobat and I have to look in the Extensions folder for an MSI file.  I have run a number of searches and  cannot find the Acrobat extension folder please advise how can I get these applications to load onto my computer?
    Also I now administer the teams and have accepted the invitation to I received to be a team member and download the apps.  The admin page shows that I have been sent an invitation but does not show my account as "ACtive" unlike my other team members.  I tried to use the link in the invite to accept it become active but the link displayed an error saying I had already accepted the invite... why is no account not active?
    Finally what other product downloads in Creative Cloud do not actually download as part of the Creative cloud Packager for downloading the apps? e.g. acrobat and what else?

    My apologies Eadeszoo I believe our support agents are unavailable on January 1.
    Are you able to copy the contents of the DVD to your computer?  Are you receiving any particular error messages when you are trying to install?  Finally which operating system are you using?

  • I have an ipod touch 2 and rebuilt my laptop.  Reinstalled ITUNES and can't find my applications on ITunes after login.  I tried to activate Itunes again but it didn't.  How can I get my applications to display on ITUNEs?

    I have an Ipod Touch 2 and rebuilt my laptop.  Reinstalled ITUNES and can't find my applications on ITunes after login.  I tried to activate Itunes again but it didn't.  How can I get my applications to display on ITUNEs?

    It sounds like you essentially have a new computer and unless you restored from a backup your iTunes library would be empty.  You can transfer your iTunes purchases from your iPod to the computer by:
    iTunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer
    SInce you changed syncing computers. after you move the stuff you need to restore the iPod to factory defaults and sync the stuff back to your iPod.  If you had the iPod backup file you could restore from backup.
    If you have non-iTunes pruchases you can copy them to your computer by using one of the third-party programs discussed in this previous discussion:
    Best iPod to PC

  • I have a new Macbook Pro but it does not have iDVD. How can I get this application?

    I have a new Macbook Pro but it does not have iDVD. How can I get this application?

    I have a new Macbook Pro but it does not have iDVD. How can I get this application?
    If you are still within your 15 day return period.  Call Apple they will sent out iDVD at no charge.  (There are no realistic substitutes.)
    Nicely explain that you may return the computer without iDVD. That usually does the trick.  You MUST speak to a senior advisor to get a free copy. The first tier people cannot do it.
    408-996-1010
    800-692-7753
    If that doesn't work you can purchase iLife 11  (includes iDVD) on disk.
    IDVD is a wonderful piece of software and well worth the low cost of $40.
    http://www.amazon.com/Apple-MC623Z-A-iLife-VERSION/dp/B003XKRZES/ref=sr_1_1?ie=U
    http://dealmac.com/lw/artclick.html?1,527850,1872219

  • How can i install AppRadio application...i am in Tunisia and the application is not found in the Tunisian AppStore...it's essensual for piloting my Pioneer SPH-D01 AppRadio....please how can i get this application ...thanks

    how can i install AppRadio application...i am in Tunisia and the application is not found in the Tunisian AppStore...it's essensual for piloting my Pioneer SPH-D01 AppRadio....please how can i get this application ...thanks

    If it's not available in the store in which you have your account, you're pretty much out of luck. In order to purchase from the U.S. iTunes Store you need a)a valid billing address in the U.S., b) a credit/debit card billed to that address or an iTunes prepaid card purchased in the U.S. and c) to be physically located in the U.S. at the time of purchase.

  • How can I get the Application DVD for IMAC Late 2009?

    How can I get the Application DVD for IMAC Late 2009?

    Disk 2 of the original disks that came with the computer?
    Call Apple, give them your computer serial number, and they will ship you disks for a small charge if disks are available. Go to the Apple Store for your country, then to the bottom of the page//Contact Us for the correct telephone number.
    If that isn't what you ant, can you provide more information?

  • Teststand 1.03 - How can I get the sequence file path into an expression?

    The sequence file will be located at different locations on different computers. I need the base address of the sequence file to get to the correct limits file. How can I get the sequence file path into a string-local expression.
    Thanks

    As Ray described, the FindFile expression function and TS API method will seach all TS search directories and return to you the path of your file, assuming the file is located in the search directories.
    If you just want the path of a TS file that you have a reference to then there is a faster, easier method. You can use the Path property of the PropertyObjectFile class. In the attached example I use an AcitiveX Automation adapter step to call Path on the property RunState.SequenceFile. This returns the path to the current executing sequence file. Note that if you have not yet saved the sequence file then the path will be empty. In a subsequence step I strip off the file name leaving the root path of the file.
    Attachments:
    GetSeqFilePath.seq ‏22 KB

  • How can I get rid of directory path in front of my folder names in Folder listing in Library mode???

    Im using the most recent version of Lightroom 5.3 (updated through CC - even though this has shown up on previous version) on Windows 7 and all the folders in my library are showing up with the directory path in front of my folder names. How can I get rid of this? I do not see any options in preferences to turn this off. I have also turned off preferences in Windows > Folder Options Control Panel "Display full Path in Title bar" option.
    I have Lightroom on several computers and have set up preferences the same on each workstation, and this only shows up on one workstation.
    Any help would be appreciated.
    You can see from the image  below how this is showing up.
    Thanks
    Thanks!

    Click the little down arrow/+ symbol  next the + - in the folders bar.

  • How can I get my applications they got deleted when I updated

    How can I get applications back I updated my phone with iTunes & all my applications got deleted how can I get them back help

    Download Past Purchases
    http://support.apple.com/kb/HT2519
    Log into iTunes using the account the Purchase was made with... Click on Buy... and a notice will come up saying you already have it... do you wish to download it again... Click Yes...

  • How can I get rid of the path in Type on a Path?

    Greetings
    Now I really feel stupid. First I couldn't find the magin tabs, now I can't get rid of the path. I have a feeling I might need to start over, but is there a way to lose the path and still have the text?

    You should highlight the text that is on the path, copy it using Ctrl+C / Command+C and then
    place a new text tool cursor elsewhere on the page and paste the text into that cursor.  Then delete
    the old occurrence of the text on path.

  • How can I get the server absolute path of virtual directory?

    Problem context:
    absolute path of my application at JRUN server is
    c:\testing
    nd url is
    http://kaspak/test
    ( kaspak is a machine local to server i-e client nd server r at same machine )
    I m uploading a file nd saving it at server.
    PROBLEM:
    server save my uploaded file at
    C:\Program Files\Allaire\JRun\servers\default
    [ a path where server is installed ]
    while I want to save it at directory
    c:\testing\uploadfiles
    How can I achieve this???
    waiting for quick reply..
    KasPak

    here is a function for which u said,
    protected void readAndSaveFile(MultipartInputStreamHandler in,
    String boundary,
    String filename,
    String contentType) throws IOException
    A utility method that reads a single part of the multipart request that represents a file, and saves the file to the given directory. A subclass can override this method for a better optimized or differently behaved implementation.
    again saving a file, or uploading a file is no problem,
    but saving a file at our desired location,
    nd this can only be done if we know reall/absolute path of our application at server,
    i-e we need an API which can tells the absolute path of our application.
    e.g
    our application url is http://kaspak/testcode
    we need its absolute mapping to directory on server
    e.g it it is at c:\testcode
    if we get the absolute path then we can pass it in above function or in File class constructor.
    isn't it??
    I think in this way i can save file at other location.
    But how i can get absolute path?????
    thanks for ur reply,
    nd waiting for ur reply again.
    wbw
    kaspak

  • How can I get the servlet Context from a WebService Implementation?

    I have made a webservice endpoint, using the conventional way (WSDL->wsimport->Java interface->implementation) . I need to get the servlet context below the implementation class. I haven't found any way to get the servletContext though. Any clues? Any help will be greatly appreciated.

    yes  i can found the words's unicode form Cmaps where may be at the type of tounicde and another Cmaps table just like "Adobe-GB1-GBK-EUC" ,but when the word dont have either of them how can i do? when i write a chinese word "一",it just the winansi encoding ,  there is not Cmap for me to use to change the "G208f" to the word "一"'s unicode value.
                   best wishes      thank you very much

  • How can I get a usable context on GNU/Linux?

    Supposedly WebGL is now enabled on Linux, but every time I try to view WebGL content it fails with this error:
    '''Warning: WebGL: Can't get a usable WebGL context
    Source File: ''http://example.com/'' Line: ''n'''''
    How can I enable WebGL on Linux?

    A good place to discuss issues with Namoroka 3.6 and Minefield 4 nightly builds and Firefox 4.0 beta builds is at the mozillaZine Firefox Builds forum.
    You need to register on the mozillaZine forum site in order to post at that forum.
    See http://forums.mozillazine.org/viewforum.php?f=23

  • How can I get an application for a casino I want to download

    Everytime I go to download a casino slotsjungle it lets my download say it is done then I go to press run something pops up saying application not found . How can I fix that help

    For the iPhone the regular power adapter will work worldwide. All you need is a plug aapter. 99% of all laptop power packs are also universal. (All Apple laptops certainly are). Look at the label. If it says 120-240 volts, 50/60 Hz it will work anywhere in the world. Again, all you need is a converter for the prongs on the plug.

Maybe you are looking for