About get host address

Hi all,
My jsp file runs in a Weblogic server. The server has been registered an host name and ip address in interent. In my jsp file, I need to get the ip address that is accessible in internet. But I encountered the following problem:
The host name of my server is: www.myudc.com.cn
The ip address of this server is: 202.108.95.108 (in interent)
192.168.0.108 (in intranet)
When I use InetAddress.getByName("www.myudc.com.cn").getHostAddress, it returns the intranet ip 192.168.0.108.
How can I get the interent ip 202.108.95.108 by host name?
Thank you very much in advance!
BR/Shirley

Hi Shirley,
this forum is only for J2ee SDK (SUN) related questions.
Sorry,
-- markus.

Similar Messages

  • Error in getting host address

    Hi All,
    I am using
    final InetAddress inetAddress=InetAddress.getLocalHost();
    String fHostAddress=inetAddress.getHostAddress();for getting the host address. In windows It is working fine. I am getting the proper address (10.25.23.25). but in SUSE Linux its showing
    127.0.0.1, i need your help pls
    regards

    I assume that you do not have a public interface, or your hostname entry in your hosts file is located on the same line as your localhost entry. Or possibly that your hostname is localhost (check with 'hostname' command).

  • DHCP via Hyper-V VM, Server2012r2 Hyper-V host, clients not getting IP address

    You have to authorize a dhcp server as Britv8 says. That's the only way it'll start dishing out leases. That's standard for Windows DHCP server in an AD Domain.
    Also there's 0 reason to mention Hyper-V here. The whole point of virtualization is to do hardware level abstraction.

    I recently encountered this. Setup:
    Initial setup of the system was at a different location from its final destination, with different network equipment (switches) between the two. No teaming is involved, however.
    Set up the system at its final destination, with DHCP via a Hyper-V VM (Server2012r2), Server2012r2 Hyper-V host, physical clients on the lan were not getting IP address.
    The physical server box has a 4-port Intel Gigabit ethernet card.
    I moved the setup (Hyper-V Virtual Switch manager) so that the interface for the DHCP server VM was isntead using one of two built-in Broadcom adapters.
    While this topic seemed promising,
    http://community.spiceworks.com/topic/251317-hyper-v-vm-not-leasing-ip-s-dhcp
    unfortunately, "fiddling about" was not what I was looking for as possible solution.
    My notes for the resolution:
    Hyper-V system running...
    This topic first appeared in the Spiceworks Community

  • Any command to get IP host address in Oracle Form 6i?

    Dear all,
    Any command to get IP host address in Oracle Form 6i?
    Best Regards,
    Amy

    Amy,
    There is sample code on OTN that allows you to fetch client information such as the IP Address with Forms 6i. Here is the link:[Get Client Information|http://www.oracle.com/technology/sample_code/products/forms/6idemos.html]
    Hope this helps.
    Craig...
    -- If my response or the response of another is helpful or answers your question please mark the response accordingly. Thanks!

  • Failed to get IP address for Local Host (2) , OPMNCTL: opmn start failed

    HI,
    Hi, I have installed on Oracle 10g on Redhat Enterprise Linux V.2.1 . I was able to start OEM without any issues. Recently I had changed the static IP address and I couldn't able to start OPMNCTL and getting the following error while starting opmnctl start. error message is as follows.
    Failed to get IP address for local host(2).....
    Failed to get IP address for local host(2).....
    Failed to get IP address for local host(2).....
    my current configuration in /etc/hosts file is as follows.
    127.0.0.1 localhost.localdomain servername
    After going through some of threads available in Oracle, I have added the static IP address in the /etc/hosts but still I am getting the same error.
    my new hosts file is as follows.
    127.0.0.1 localhost.localdomain servername
    10.21.253.102 localhost.localdomain servername
    I don't know why this is looking for localhost (2). I did not set up any local host (2) and I could not see anything in my network confiuration also.
    could you please help me in this issue? I appreciate your help in this regard.
    Thanks
    venkat

    Hi, i think that the application server part is looking for a /etc/hosts entry
    in this format:
    127.0.0.1 localhost
    As i noticed, this is used for internal communication.
    Try this entry as is, without a domain...

  • Getting host name and IP address

    I have develop different types of forms which resides on server and clients are acessing it.Now from my end i want to track that which user is accessing my forms on the server i.e i want to know the client IP address and host name.When the user execute some query on the database then i will get it easily using sys_context function but if it perform some functions within the form and i catch the host name then it returns the server host name where the actual forms resides not the client host name and i want to know the client host name and IP address who is running the forms.Plz let me know the way so i can do that easily .
    thanks

    Hi Grant,
    I want to get ip/address host name of reports server, sitting on forms server.
    can you tell me how to do this.
    in a web base environment.
    i have several report server instances running on different machines.
    when i run a report using RUN_REPORT_OBJECT using report_server=mac_rep1
    i want to know mac_rep1 resides on which host/ip machine.
    regds

  • How to get ip address of host?

    Hello,
    Is there any way to get ip address of host via sql or pl/sql?
    Thanks in advance.

    as sys or system or whatever
    create view hackview as select host_name from v$instance;
    grant select on hackview to public < or whatever >
    create public synonym for hackview
    now you can do it to your heart's content. select host_name from hackview
    note : hostname may change if rac or standby in use.

  • Remote host address in Java Server Faces

    how to get remote host address in JSF/Portlet application.
    getFacesContext().getExternalContext().getRequest().getRemoteAddr() is not available, even header map (getRequestHeaderMap()) does not contain any data about client.

    In a portletcontext the getRequest() have to be casted to PortletRequest. Then you can use getRemoteUser() on it.

  • How can I get the address from a map struct?

    Hello,
    Who knows how to get the address from a map struct, and what's the meaning of the eighth argument (addr) of ufs_getpage() ?
    I developed a modular to encrypt certain files. The approach is: I�fll change the vnode's v_op pointer when opening a file which should be decoded. I make the vnode->v_op point to my own ops struct. I made a new ufs_getpage function like below:
    static int newufs_getpage(struct vnode* vp, offset_t off, size_t len,
    uint_t* protp, page_t* plarr[], size_t plsz,
    struct seg* seg, caddr_t addr, enum seg_rw rw,
    struct cred* cr)
    call old ufs_getpage(vp, off, len, protp, plarr, plsz, seg, addr, rw, cr);
    decode the page.
    After reading some source code about kernel, I know the plarr is the page which is read from the disk. But I don't know how to get the address of the page. I tried like below, but failed.
    caddr_t baseaddr;
    page_t *pp;
    pp = plarr[0];
    �c�c
    baseaddr = hat_kpm_page2va(pp, 0);
    �c�c
    I logged the baseaddr:
    cmn_err(CE_NOTE, �gbaseaddr %s�h, baseaddr);
    or
    char _buff[8];
    int _len;
    copyinstr(baseaddr, buff, 8, &len);
    cmn_err(CE_NOTE, �gbaseaddr %s�h, _buff);
    But I found the baseaddr is not what I want. Is there something wrong with my approach? What's the meaning of the eighth argument (addr) of ufs_getpage()
    By the way, is there any documents concerning to the functions such as segvn_fault�Appmapin/ppmapout except the source code?

    Hiya,
    I think the address is the faulting address in segmap.
    But why not have a look at the file event management framework in NFSv4:
    http://cvs.opensolaris.org/source/xref/on/usr/src/uts/common/fs/fem.c
    To support NFSv4 delegation, FEM provides hooks to intercept filesystem operations.
    Maybe you could use that to implement what you want? Probably safer than doing what you are doing now. Go see fem_install().
    Cheers,
    R.
    Message was edited by:
    ralphyt

  • Please help: Get IP address of a remote device (wifi kit) from DHCP router

    Hi ppl,
    I am about to get the IP address for the wifi kit which is connected to the same router with my PC.
    I need to control my wifi kit through TCP client communication, but DHCP tends to assign new IP address to my wifi kit when connected to router.
    Hence, i wish to write a java function to trace the IP address before starts the communication.
    I am thinking to get the wifi kit's IP address based on the Hostname (name of the wifi shield):
    As below:
    InetAddress thatIp = InetAddress.getByName("Wiznet");
    System.out.println("IP E:"+thatIp.getHostAddress());
    But i don't think this is secure..
    I attempt to research for getting IP address with MAC..
    But have ambiguity on the result i found.
    It stating i have to get the ARP table from router but it is not a good approach.
    I have no luck for next finding on how retrieving the table with Java.
    Hereby hope to have your advise how can i get the ip address of my wifi kit in a more dynamic and secure method..
    is it using Hostname or MAC address or else...
    many thanks.

    hi... wish to have your advise again.
    I tried to retrieve the arp table in java and attempt to extract the IP address based on MAC address for particular devise.
    But i stuck with the substring... my code is as below:
    Process result = Runtime.getRuntime().exec("arp -a");
         BufferedReader output = new BufferedReader
                   (new InputStreamReader(result.getInputStream()));
         String line = output.readLine();
         while(line != null){
              if ( line.startsWith("default") == true ){
                   System.out.println("is default");
                   break;
         line = output.readLine();
         String ipAdd = line.substring(0, 18);
         String MACAdd = line.substring(24, 42);
         System.out.println(line.length() + " " + line + " " + ipAdd + " " + MACAdd );
    i m trying to sub the IP and MAC accordingly.. but i got error saying
    Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 42
         at java.lang.String.substring(Unknown Source)
         at ExecTest.main(ExecTest.java:22)
    i dun understand this! as since the length of LINE is 56 , why STRING INDEX OUT OF RANGE happen?!
    please advise!!!

  • Can't get Firefox to open a new tab as my homepage or a specific url. Alwatys get 'The address isn't valid'

    When opening a new tab, I keep getting 'The Address isn't valid'. Went through all the fixes given in previous threads, changing the url in about:config, running Firefox in safe mode (problem still exists with plugins disabled) resetting Firefox, changed newtab settings to about:home etc, restarted, deleted cookies. Nothing seems to work. Some other program seems to be overriding the Firefox settings. May be a virus. I am using the latest McAfee software.
    I once had an add-on that brought up thumbnails with a new tab but I removed that a while back.
    On the right hand side search bar of firefox I can see that Bing is one of the dropdown search engine choices not that it should make a difference but I thougth they were sometimes a bit aggresive.
    Anyhow, would love to know if there is a solution as it's making me suspicious of having an undetected visus or hijacking.

    Thanks for your relpy but I've already tried these solutions and no joy. I tried them again there just to be sure but still no good.
    In the mean time I installed a plug-in that does this for me. I used My Homepage 1.2 and it's done the business.
    Still don't know what was causing the problem. (And it wasn't a typo, I checked and copied and pasted urls from other locations...)

  • Can't get ipv6 address assigned correctly.

    I use NetworkManager and dhclient for auto-configuration but it has some weird problems.
    When I boot up my laptop, I only have chance to get access to ipv6 network, when I fail, I tried to delete the connection in Network Management Settings, and then added a new profile, disable and then enable the network again. Sometimes it works well, but sometimes it failed to auto-config.
    If I use the command:
    $ ip -6 rout
    then I'll get the following message:
    unreachable fe80::/64 dev lo proto kernel metric 256 error -101
    fe80::/64 dev wlan0 proto kernel metric 256
    default via fe80::2e0:2ff:fe54:59 dev wlan0 proto static metric 1
    every time the default gateway is configured well, sometimes the address the address is missed , and if I do the following:
    $ ping6 -I wlan0 -c 4 fe80::2e0:2ff:fe54:59
    It responses normally.
    PING fe80::2e0:2ff:fe54:59(fe80::2e0:2ff:fe54:59) from fe80::1034:56ff:fe78:9124 wlan0: 56 data bytes
    64 bytes from fe80::2e0:2ff:fe54:59: icmp_seq=1 ttl=64 time=5.32 ms
    64 bytes from fe80::2e0:2ff:fe54:59: icmp_seq=2 ttl=64 time=6.64 ms
    64 bytes from fe80::2e0:2ff:fe54:59: icmp_seq=3 ttl=64 time=10.6 ms
    64 bytes from fe80::2e0:2ff:fe54:59: icmp_seq=4 ttl=64 time=3.60 ms
    --- fe80::2e0:2ff:fe54:59 ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3005ms
    rtt min/avg/max/mdev = 3.603/6.546/10.617/2.587 ms
    do the following:
    $ ip -6 addr
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436
    inet6 ::1/128 scope host
    valid_lft forever preferred_lft forever
    3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 2001:250:4400:d000::161/128 scope global
    valid_lft forever preferred_lft forever
    inet6 fe80::1034:56ff:fe78:9124/64 scope link
    valid_lft forever preferred_lft forever
    I found I just sometimes can get the ipv6 address start with 2001:
    If the address is assigned, then:
    $ ping6 ipv6.google.com
    PING ipv6.google.com(ipv6.google.com) 56 data bytes
    ^C
    --- ipv6.google.com ping statistics ---
    11 packets transmitted, 0 received, 100% packet loss, time 10008ms
    response nothing!
    Then I switch into Windows 7, if something like above happened, then I managed to set the MAC address to a random value such as 12-34-56-78-91-23, soon, the problem will be corrected, I'll get a new ipv6 address assigned by DHCPv6 server. If I switch back to arch, set the MAC address in NetworkManager, it didn't have function at most time, and the ipv6 address even won't change!
    Can anyone help me with this problem?
    by the way, I never get ipv6 address when I use dhcpcd.

    bernarcher wrote:
    Hello and welcome to the forums heliumhgy.
    Just in case you are wondering where your post has been gone: The moderators board received this message from you:
    I dont need tunnel to access to ipv6, My univ use dual-stack to get both ipv4 and v6 work around all campus.
    This is because you inadvertently used the "Report" link. But don't worry this happens rather often.
    Just cause I caught the glimpse of re-blabla, and mistaken it as reply
    Last edited by heliumhgy (2012-11-29 03:16:11)

  • Getting host name of the remote client using getRemoteHost() --Problem

    Hi everybody
    Does anyone know how I can get the Host name out of the request ? I just get IP address which I do not need at all , any suggestion ?
    Many thanks
    Arash

    If it has a name then
            InetAddress addr = InetAddress.getByName("212.58.224.123");
            System.out.println(addr.getHostName());

  • Stored procedure for getting host name, host instance and status of that host is it running or stopped.

    Hello all,
    yesterday I got one task in that I have to stored procedure for getting host name, host instance and status of that host is it running or stopped.
    any body knows where exactly, In which table this details are there in BizTalk databases.
    thanks

    Status of the host instance is not stored in the SQL database for you to query the status using stored procedure. You have to either use Powershell or WMI to get the status.
    In SQL, following table contains the details about the host like Name, LoginName, IsDisables etc but status of the host instance is not stored in the database.
    SELECT * FROM BizTalkMgmtDb..adm_HostInstance
    Powershell to get the status:
    http://axonolympus.nl/?page_id=186&post_id=969&cat_id=6&lang=en
    WMI to get the status:
    https://msdn.microsoft.com/en-us/library/aa561820.aspx?f=255&MSPPError=-2147217396
    https://msdn.microsoft.com/en-us/library/aa578621.aspx
    Regards,
    M.R.Ashwin Prabhu
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Getting host, port from the tnsnames.ora with the service name

    Hi.
    I think that I asked a similar question yesterday. I want to ask if there is a way to get host and port from the tnsnames.org with a given service name. Somebody answered it for getting SID in the sqlplus. so I tried it in a similar way, but it didn't work.
    I have a service name, but I don't know how to get host and port. I know that I can parse the tnsnames.ora file to get it, but if possible, I want to use the more official and safe way.
    I'd appreciated if somebody knows it.

    caesarkim wrote:
    Hi.
    I think that I asked a similar question yesterday. I want to ask if there is a way to get host and port from the tnsnames.org with a given service name. Somebody answered it for getting SID in the sqlplus. so I tried it in a similar way, but it didn't work.
    I have a service name, but I don't know how to get host and port. I know that I can parse the tnsnames.ora file to get it, but if possible, I want to use the more official and safe way.
    I'd appreciated if somebody knows it.Oracle RDBMS does not require SQL*Net to operate.
    Oracle RDBMS does NOT now or care about content of any tnsnames.ora file.
    Realize that each (remote) user can have their own personalized copy of tnsnames.ora
    The content of tnsnames not NOT have to reflect any reality.
    I could post the content of my tnsnames.ora & it would be useless to everyone reading.

Maybe you are looking for

  • PL/SQL log messages are not printing from Java concurrent program

    Hi, I have a strange issue while submitting the Java concurrent program through PL/SQL. I have a PL/SQL concurrent program which will invoke the Java concurrent program inside the package by use of "FND_GLOBAL.SUBMIT_REQUEST". It worked and submitted

  • Problem in translation to other language

    I have worked on a web application using JHeadStart Version 10.1.2.0 and JDeveloper 10.1.2.1.0, I have to translate all interfaces to other language (Arabic), So I generated the (ApplicationResources_ar.proberties) by setting the property (Generator

  • Toshiba satalite L305D starts then shuts off. Need help.

    Basically the computer will start then about 10-20 sec later will shut off. No display what so ever. Doesnt seem like the computer is getting to POST. Ive done my research, im just looking for some things to try.  Things Ive tried. * Changed power ad

  • Oracle 9i Forms

    I have a form was converted from Oracle forms version 4.5 (character mode) to the 9i forms. it has a multi-record block. The first field on that block is a date field for user to enter a valid date. Please see the codes below, =======================

  • How to backup the iPod on a PC?

    My hard drive crashed and lost my songs on iTune. Now, I want to backup the songs from my iPod to my new hard drive. How can I do this?