How do I get the hostname(or address) of the server?

How do I get the hostname(or address) of the server inside code
running on the server? I can use
Admin.getServer().getListenPort() to get the port number; but
calling Admin.getServer().getListenAddress() returns null.
Thanks
Rajesh

Rajesh,
Try this:
import java.net.InetAddress;
Address.getHostName(); // This returns a string with hostname
"Rajesh Kommu" <[email protected]> wrote:
>
How do I get the hostname(or address) of the server inside code
running on the server? I can use
Admin.getServer().getListenPort() to get the port number; but
calling Admin.getServer().getListenAddress() returns null.
Thanks
Rajesh

Similar Messages

  • How to Find the Hostname / IP Address of Reports Server From Forms

    Hi
    We have following query to find out on which machine form server is running,
    but how to find hostname/ip address of reports server (if there are more than one reports server running and on different machines).
    SELECT SYS_CONTEXT('USERENV','HOST'), SYS_CONTEXT, SYS_CONTEXT('USERENV','IP_ADDRESS')
    from dual.
    can anybody answer?
    rocky rocks.

    Our oas name is the same as the box name, and the report server naming convention is rep_(oas name) so that makes it easy to find out.
    I have a pll attached to my form that contains the following function, which works for PC or UNIX based app server:
    -- get_oas_name - Returns OAS name. 
    -- caveat:  Can't be run from pre-form, when-new-form-instance or when-new-block-instance of first
    --          block on the form due to webutil limitation.
    FUNCTION get_oas_name RETURN varchar2 IS
      fp text_io.file_type;
      oas_name varchar2(30);
      op_sys varchar2(30) := get_application_property(OPERATING_SYSTEM);
    BEGIN
      if op_sys = 'WIN32COMMON' then                    
        oas_name := webutil_clientinfo.get_host_name;
      elsif op_sys = 'SunOS' or op_sys = 'UNIX' then
        host('/bin/uname -n > /tmp/oas_name');
        fp := text_io.fopen('/tmp/oas_name','r');
        text_io.get_line(fp, oas_name);
        text_io.fclose(fp);
      end if;
      return oas_name;
    END;Then in when_timer_expired (first place you can use webutil functionality) call it accordingly. I also use it to set platform dependant variables so the form will run
    when I'm working on my PC or deployed on UNIX:
    declare
      :control.op_sys  := get_application_property(OPERATING_SYSTEM);
    begin
          :control.oas_name := get_oas_name;
          :control.report_server := 'rep_'|| :control.oas_name;
          if :control.op_sys = 'WIN32COMMON' then        -- For running locally during development.                     
            :control.close_page := 'http://127.0.0.1:8889/forms90/common/window_close.htm';
            :control.rpt_temp := 'c:\temp\';
          elsif :control.op_sys = 'SunOS' or :control.op_sys = 'UNIX' then
            :control.close_page := 'http://'||:control.oas_name||'.yournamehere.com:7779/forms90/common/window_close.htm';
            :control.rpt_temp := '/appl/oas/yournamehere/reports/cache/';
          end if;
    end;Good luck,
    Gary

  • HT5622 I changed my Apple password and I get the information at the wrong email address.  The correct email shows in my Apple account.  Why is the mail going to the wrong email? How do I fix it?

    I changed my Apple password and I get the information back at the wrong email address.  My email address is right under my Apple ID.  How do I get this corrected?

    AWDunams wrote:
    Okay so I associate the e-mail address as the apple ID and that seems to be a wrong assumption.  I did go to my Apple ID and changes the e-mail address and the password but for the same and only Apple account I have ...
    That is good.  In that case, your one and only account has not changed, just the login credentials you use for it.  All your previous purchases will remain associated with that account, and the new login.
    In essence, an AppleID is an email, but it has two parts.  One is the login email address and password everyone traditionally thinks of as an AppleID.  But that in turn is linked to an account with Apple.  As long as you use the manage Apple ID portal to just change the email address and/or password for your exisiting AppleID, then the internal account tracks along with those changes as well.
    However, on your iOS devices, you will need to log out and then log back in with the new login credentials:
    settings -> iTunes & App Stores - tap your AppleID, and choose log out.  Then log back in with the new email address and new password.

  • I have a new iPad. I am using Comcast as my email provider but when I send a message, it pulls up the facebook email addresses for my  contacts  instead of the addresses stored in my comcast account.  How can I get rid of the Facebook email addresses? The

    I have a new iPad. I am using Comcast as my email provider but when I send a message, it pulls up the facebook email addresses for my  contacts  instead of the addresses stored in my comcast account.  How can I get rid of the Facebook email addresses? The comcast addresses are stored in the comcast (xfinity) app.  I do not use the "mail" or "contacts" apps ....I go straight to comcast (xfinity).  I wish I could start over!!!  thanks.
    iPad

    I could be wrong, but it sounds like Facebook imported to your contacts.  I have the Xfinity app on my new ipad, too, but none of my stored contacts from the online version are showing, only what I manually entered into the iPads contacts are there.  When I did add the FB app, I did not grant it permission to push and pull from my ipad (not a fan of FB knowing every detail about me), so that may be where our difference lies.  You could try to open the app and change your privacy settings, or delete it and then reinstall without granting permissions to integrate.
    I'm sure someone here with a lot more knowledge then me can probably diagnose your issue better, though.  Good luck!

  • Remember only the icloud email address, forget the password, birthdate, and verification questions. How can i get the icloud email back?

    Remember only the icloud email address, forget the password, birthdate, and verification questions. How can i get the icloud email back?

    Go to https://getsupport.apple.com ; click 'See all products and services', then 'More Products and Services, then 'Apple ID', then 'Other Apple ID Topics' then 'Forgotten Apple ID security questions'.

  • I add my comcast email to the mail on a iMac running Maverick. It downloads all my emails from there. How do i get my email to delete of the the server

    I add my comcast email to the mail on a iMac running Maverick. It downloads all my emails from there. How do i get my email to delete of the the server

    Go to Mail Preferences>Accounts, click the '+' button below the list of accounts and insert the settings, username and password as instructed. Some account types can be set up automatically as soon as Mail knows the emails address (because the server settings are built in), in other cases you will have to get them from your ISP.

  • Re: How can I get an accurate NS address?

    JC,
    Create an ExternalConnection object in the partition, and use the
    GetDotAddress method on it. That will give you the IP address of wherever
    your partition is running. You can do this with one line:
    MyIP : TextData = new( value = ExternalConnection().GetDotAddress() );
    Don
    At 05:18 PM 8/20/97 -0500, J.C. Hamlin wrote:
    We have an application that needs to establish a TCP/IP connection to a
    non-Forte service also running on the same server machine as Forte. We
    would like to not store the IP Address of this server, as it will always
    be the same IP address as the NS address (of course, the port will be
    different). I'm trying to find a way to get the IP address of the name
    server, and it must be without accessing a distributed reference to an
    object on the server (i.e. it must be stored locally in the client
    partition). I know it has to be stored somewhere, as Forte reads the
    value from "FORTE_NS_ADDRESS", and the "-fns" command line flag can
    override that value. But can I access it?
    I could always do a task.part.operatingSystem.getEnv("FORTE_NS_ADDRESS")
    but I don't think that will always be accurate, as the -fns flag can
    override the value stored in that environment variable for a particular
    ftexec process.
    Anyone know where this might live and how I can access it?
    Thanks in advance!
    J.C. Hamlin, Senior Consultant
    Forte National Practice
    Born Information Services Group, Wayzata, MN
    Phone: (612) 404-4162 Fax: (612) 404-4440
    <[email protected]>
    ====================================
    Don Nelson
    Senior Consultant
    Forte Software, Inc.
    Denver, CO
    Corporate voice mail: 510-986-3810
    aka: [email protected]
    ====================================
    "Tigers are natural-born tree climbers.........Of course, we usually have
    grappling hooks, ropes and utility belts." - Hobbes

    J.C. Hamlin wrote:
    >
    We have an application that needs to establish a TCP/IP connection to a
    non-Forte service also running on the same server machine as Forte. We
    would like to not store the IP Address of this server, as it will always
    be the same IP address as the NS address (of course, the port will be
    different). I'm trying to find a way to get the IP address of the name
    server, and it must be without accessing a distributed reference to an
    object on the server (i.e. it must be stored locally in the client
    partition). I know it has to be stored somewhere, as Forte reads the
    value from "FORTE_NS_ADDRESS", and the "-fns" command line flag can
    override that value. But can I access it?
    I could always do a task.part.operatingSystem.getEnv("FORTE_NS_ADDRESS")
    but I don't think that will always be accurate, as the -fns flag can
    override the value stored in that environment variable for a particular
    ftexec process.
    Anyone know where this might live and how I can access it?
    Thanks in advance!
    J.C. Hamlin, Senior Consultant
    Forte National Practice
    Born Information Services Group, Wayzata, MN
    Phone: (612) 404-4162 Fax: (612) 404-4440
    <[email protected]>
    Hi JC,
    So you want to connect to the Non-Forte Service on the same server as
    Forte is running on, from the Client, whose fns might be passed as a
    command line argument.
    Try getting it from task.part.CmdLineArgs which returns an array of
    Textdata of the all the arguments passed.
    Bala Cuddalore
    Sage Solutions
    [email protected]

  • How can i get my e-mail address linked to my skype...

    I need help!!!!
    How can i get my e-mail address linked to my skype user name.
    Regards Gerald

    You can use a different email account, but it will not appear on icloud.com as iCoud only hosts iCloud email.  Just add your account to the email client on your PC as you would any other email account.  To add the account on your iOS devices (iPhone), go to Settings>Mail,Contacts,Calendars>Add Account, choose your provider and provide your account details.
    You can't redownload purchased ringtones from iCloud for free but you can sync them to your 5c using iTunes.  To do so, connect your iPhone 4 to your computer, open iTunes and go to File>Devices>Transfer Purchases.  Then go to the Tones folder of your iTunes library and confirm that the ringtones appear there.  (If you don't see the Tones folder, go to Edit>Preferences>General and make sure Tones is checked in the Show options.)
    Then connect your 5c to your computer, open iTunes, click on the name of your phone in iTunes, go to the Tones folder of your iTunes sync settings, then check Sync Tones and click Apply at the bottom to sync your phone.

  • How can I get my e-mail address associated with Adobe Digital Editions?

    How can I get my e-mail address associated with Adobe Digital Editions?

    gjortega,
    Your sidekick may be relaying through a different server. If its on AT&T, it could be using cwmx.com for outgoing. However, cwmx.com only works for AT&T/Cingular EDGE customers. When on Wi-fi it won't allow you to send through it.
    Many internet providers, but not all, provide an authenticating SMTP server to use when travelling. If you configured your outgoing server to use the email providers authenticating SMTP server information on a port different from port 25, you will be able to use it on most networks. Some wireless networks filter a wider range of ports, such as some work places.
    This article discusses the issue in more detail:
    http://docs.info.apple.com/article.html?artnum=305634
    Hope this helps,
    Nathan C.

  • How can I get my POP account showing in the inbox it's supposed to show in?

    Hi-Until a couple of weeks ago all mail received from my IMAP and POP accounts would show up in the correct mailboxes in my Mail inbox list. (Only problem then was that sent mail would never show up in the sent mail folder--always stayed in the inbox.)
    Now a new problem has happened----unless I go directly to my charter cable account (P0P account) to retrieve any mail sent to that particular address, the mail goes unnoticed by Mail on my MAC and nothing shows up in the inbox. But--- If I do a test to myself , sending an email to the POP address from my IMAP account from my MAcMAil, my IMAP account will show the email in the inbox of the IMAP account I sent it from as if I'd mailed it to that account. How can I get my POP account showing in the Inbox? And, any suggestions for a fix to getting the "sent" mail to show in the "sent" folder would also be appreciated.
    Thanks!

    Control click in the tool bar area and customize.

  • How do I get my Exchange "home" addresses to show up in Contacts?

    I synch my iPhone contacts from my work Exchange Server.  Ever since I upgraded to IOS7, I cannot see any "home" addresses for my contacts.  All I can see is "work" addresses for each contact.  All phone numbers and e-mails are fine.  It's only caused the "home address" field to disappear on my phone.  How do I get my Exchange "home" addresses to show up?

    I had a similar issue with my Outlook contacts' home addresses missing on my iPhone after having upgraded to iOS 7. There is a workaround - for each problematic contact on your iPhone, add a dummy address by editing the contact. The home address will now appear. If you have many contacts at once, try the workaround by using this method of batch-editing iPhone contacts.

  • I had to reset my Apple password and now my iTunes and iCloud passwords no longer work. How do I get them linked again and under the same password. I've tried my new password on each login screen and it isn't accepted.

    I had to reset my Apple password and now my iTunes and iCloud passwords no longer work. How do I get them linked again and under the same password. I've tried my new password on each login screen and it isn't accepted.

    Hi skippy2012trev,
    Welcome to the Apple Support Communities!
    I understand that you updated your Apple Id and password but now you are being prompted for the old information in iCloud. You are on the right track by changing the Apple ID back to the previous email address temporarily so that you can sign out. You should not need to verify the email address. After you edit the Apple ID back to the old email address and then sign out of iCloud on your iPhone, edit the Apple ID back to the address you would currently like to use. There is no need to change the password again, only the email address, unless you prefer to update the password again.
    If you're asked for the password to your previous Apple ID when signing out of iCloud - Apple Support
    Change your Apple ID temporarily
    If signing out and back in to iMessage or FaceTime didn't help, try these steps:
    Change your Apple ID to the Apple ID you used previously. You shouldn't need to verify the email address.
    Tap Settings > iCloud. Complete these steps only if the Find My [Device] setting is turned on:
    Scroll down and tap Sign Out, then tap Sign Out to confirm. If you're using iOS 7 or earlier, tap Delete Account, then tap Delete to confirm.
    Tap Keep on My [Device] or Delete from My [Device]. In either case, your data remains in iCloud and will be updated on your device when you sign in to iCloud again.
    Enter the password for your previous Apple ID.
    Change your Apple ID to the new email address that you want to use. You'll need to verify the email address.
    Return to Settings > iCloud and sign in with your new Apple ID.
    Cheers,
    Joe

  • HT3529 how can I get a rescue email address ?

    how can I get a rescue email address ?

    Click here for information. If you can't do it through the method described in that article(it requires correctly answering two of the security questions), contact the iTunes Store staff via the link in the 'Additional Information' section.
    (101081)

  • How do I remove/delete another email address in  the window where I have to type in my Apple ID? The email address in there is not mine. Help please

    When I go to enter my Apple ID ( to update an application ) there is another email address entered which is not mine. So, even when I type in my correct ID , obviously my ID does not match this other email address. How did this 'other' email  address get there and how do I get this other email address deleted ? Than you for any advice.

    You installed a hacked app, originally from the Mac App Store. It contains the receipt for a different app, downloaded using an account that you don't control. You need to identify and remove the hacked app.
    Important: The app you need to remove is not necessarily the one named in the App Store alert. For example, the App Store could prompt you to update "Angry Birds" or "Twitter," but the hacked app could be "Final Cut Pro." Don't make any assumptions about which app you're looking for. To find it, you must carry out a systematic search with Spotlight.
    1. Triple-click anywhere in the line of text below on this page to select it:
    kMDItemAppStoreHasReceipt=1
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    2. In the Finder, press command-F to open a search window, or select
              File ▹ Find
    from the menu bar. In the search window, select
              Search: This Mac
    from the row of tokens below the toolbar. Below that is a popup menu of search criteria, initially showing Kind. From that menu, select
              Other...
    A sheet will drop down. In that sheet, select
              Raw Query
    as the criterion, then click OK or press return.
    Now there will be a text box to the right of the menu of search criteria. That's where you enter the raw search query. Click in that box and paste the text you copied earlier by pressing command-V.
    3. The search window will now show all the App Store products that are installed. Compare those search results with the list of your purchases from the App Store. To see the complete list, you may need to unhide hidden purchases. If any apps were download from the App Store using other Apple ID accounts that you control, sign in to the store under each of those ID's and check the purchases.
    4. At least one of the apps in the Spotlight search results is not among your purchases in the App Store. Move each such item to the Trash, after quitting it if it's running. You may be prompted for your administrator password. Empty the Trash.
    5. Quit and relaunch the App Store. Test.
    If you find these instructions confusing, ask for an alternative method.

  • How do i get contacts from my address book in entourage to upload to iCloud?

    How do I get contacts from my address book in entourage to upload to icloud and so onto my ipad??  can they get to the ipad some other way??

    Thanks for the reply Julian, but I tried that and the only cards that show up in that "contacts" folder are the ones that come with the iPod: ipodcreatedsample.vcf and 2 others.
    I brought this to the genius bar at my local Apple store, and they couldn't figure out how to do it, so this one is definitely a challenge. The genius bar advice was: "try to find a solution online." Aaack.

Maybe you are looking for