Get host name.

Hi all,
I have my applet which connects to a server. Obviously for security i can only download it from the machine it came from.
Currently im passing in the host name as a param.
Is there a way to find out the host name with out using a paremeter? I will always be running from the host machine the applet came from anyway.
Has any1 got any ideas?
Thanks

You can extract the host name from the URL returned by the method getDocumentBase().

Similar Messages

  • 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.

  • Network Error []: Cannot Get Host Name when running business rules

    Guru's
    We are getting the following error intermittently when we are running business rules (Planning Application >>Tools>>Business Rules) or running SmartView refreshes:
    Network error []: Cannot Get Host Name
    The following is then logged in the Essbase Application logs:
    Local/Application/Database/admin@Native Directory/Error(1042022)
    Network error []: Cannot Get Host Name.
    A quick look at the Essbase Error Messages Doc says it is a network error and we have to consult the network documentation. Unfortunately this is not very descriptive so we logged an SR with Oracle but we don't seem to be getting a resolution.
    The environment is 11.1.2.0 and the architecture is as follows:
    Server 1 - MS Server 2008 x64:
    Planning, Calc Manager, Foundation Services, Framework Web Services, EAS, APS, Web Analysis, FR Web Services
    Server 2 - MS Server 2008 x64:
    Essbase Server
    Server 3 - MS Server 2008 x64:
    Framework Services, FR Print Services
    We have tried doing the following:
    1. Put in the server host names into the hosts file on the Hyperion Servers
    2.  Applied the following TCP/IP settings on all the Hyperion Servers and one of the user machines as a test:
          - Added a new DWORD Value named TcpTimedWaitDelay and set it to 30.
         - Added a new DWORD Value named MaxUserPort and set it to 65534.
         - Added a new DWORD Value named MaxFreeTcbs and set it to 6250
    3. Confirmed that there are no packet drops by monitoring the server NICs so no packet loss could be the cause of this issue
    4. The Essbase Config file has the following settings:
    NETDELAY 2000
    NETRETRYCOUNT 2500
    Has anyone come across this issue and if you managed to resolve it, how did you go about it.
    Thanx

    Hi Rahul
    The issue is happening to a number of calcs so it it not one calc specifically. I will ask the functional consultants to enhance the logging in the business rules so that we can see if the issue happens on a specific member\block etc and yes we do use Xrefs
    We can run this as a calc in EAS without any issues and it's intermittent because this business rule runs 95% of the time in Planning Application >> Tools >>Business Rules without any issues.
    Thanks

  • How to get host name in the workflow?

    Hi,
       I've a requirement where I need to get CQ Inbox url (http://<hostname>:<port>/inbox) in my custom workflow process. I thought of configuring url to some node and retriving from there.. but It's not the good approach as host name will be different for differnt CQ environments. So what is the best way of getting inbox url?
    Env: CQ 5.6
    Thanks
    Siva

    Yep Justin, If the configuration is wrong, any link generated would also be wrong.. I mean, default configuration will be some thing like..
    I mean, I can change those configurations as per my instance host name, right?
    Example: my instance's host url is:  mytest:1501
    So I would like to update the same in configurations ..

  • 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());

  • Getting host name and port number from application

    Does anyone know how I would be able to get the host name
    and port number from an application launched by java webstart ?
    This is the host and port of the URL that this application is launched from.

    A couple of suggestions:
    -The note is about 6.40. Doesn't fit for your server
    -Don't!
    -Reinstall!
    Regards,
    Benny

  • Getting host name and port number from an application

    Does anyone know how I would be able to get the host name
    and port number from an application launched by java webstart ?
    This is the host and port of the URL that this application is launched from.

    A couple of suggestions:
    -The note is about 6.40. Doesn't fit for your server
    -Don't!
    -Reinstall!
    Regards,
    Benny

  • Getting host name

    I am using serverSocket and the .accept() method to wait for a connection and I want to store the address of the computer that connects to the server. Is there a way to do this?

    Yes. accept returns a Socket and you can get the remote InetAddress from that and from that in turn get the host name.

  • Getting host name or ipaddress for viirtual server

    I want to get the ipaddress or host name for virtual server in a cluster environment. If i do
    java.net.InetAddress.getLocalHost().getHostName()
    it returns the ipaddress of the physical node currently running virtual server.
    Is there any way to get the ipaddress or host name for virtual server ?

    Might help to define what you actually mean by "virtual server" and what you actually want as well (and from what process.)
    For example a clustered system with a single entry point. And you want the client to have the entry point. In this case the virtual address (ip and/or host) should always be returned. You can't get the individual address of a specific server. If that is not the case then something is wrong with the clustered system, not java/client.
    Another example, a server in the cluster. Then it only knows about its own real address. If you want the cluster then you have to explicitly deliver that information to it, the box itself does not know it.
    Something else?

  • Getting Host Name From Forms 6i (deployed in 10g AS)

    Hi,
    I need to get the host name of client while launching my application. I am using forms6i. So I cannot use webutils.pll for the same. But in the below thread I have read that Webutil.pll has been modified to use with FORMS 6i also. Can anybody send me webutils.pll which can be used with Forms 6i
    Re: Converting to Webutil? 6i and 9i equivalents.
    Its an urgent requirement
    Any help is appreciated.
    Thanks

    Hi,
    I have tried sys_context and java class option already ..but in vain :(..
    Let me explain my problem in detail.
    My database server(Oracle 10g) is in HOSTA
    My appserver (Oracle 10g AS)resides in HOSTB
    And user launches the application from HOSTC
    My requirement is to get the host name of the user while he launches the application. ie HOSTC in this case.
    If I am trying with java.net.InetAddress.getLocalHost().getHostName(); I am getting the value HOSTA(Host name of Data base server)
    If I am trying with SYS_CONTEXT I am getting HOSTB(Host name of appserver)
    And my requirement is to get HOSTC !!!
    I have read that if Webutil_clientinfo.get_host_name is used I can get the host name of client machine. But since I am working with forms 6i , I can't use Webutil.
    please help me if you know any way to achieve the same in forms 6i

  • How to get Host name and SQL Instance Name by T-SQL

    I am using SQL 2000, 2005 and 2008. I have few multi instances SQL servers. I would like to gather following information:
    Host Name
    SQL Instance Name
    SQL Version
    Server1
    Server1
    SQL 2000
    Server1
    Server1\ABC
    SQL 2005
    Server1
    Server1\XYZ
    SQL 2008
    Server2
    Server2
    SQL 2008
    Is there any way I can get it by T-SQL? Any help would be appreciated.
    Thanks
    Saumen 

    SELECT
    SERVERPROPERTY('MachineName') AS [ServerName],
    SERVERPROPERTY('ServerName') AS [ServerInstanceName],
    SERVERPROPERTY('InstanceName') AS [Instance],
    SERVERPROPERTY('Edition') AS [Edition],
    SERVERPROPERTY('ProductVersion') AS [ProductVersion],
    Left(@@Version, Charindex('-', @@version) - 2) As VersionName
     |
    Blog: MSBICOE.com |
    MCITP - BI, SQL Developer & DBA
    Hate to mislead others, if I'm wrong slap me. Thanks!

  • How to get Host name and port inside UDF

    Hi,
    I want to access the Host and port in UDF to pass it to a link http://host:port/AdapterFramework/ChannelAdminServlet?party=&service=&channel=*&action=status dynamically.
    How can I acieve it?
    Manisha

    Hi
    With this code. I am getting error:
    try
    java.net.InetAddress addr = java.net.InetAddress.getLocalHost();
    String host = addr.getCanonicalHostName();
    catch (UnknownHostException e){}
    if (ProcessMode.equals("P"))
    try{
    String xyz="/AdapterFramework/ChannelAdminServlet?party=&service=&channel="Name"&action=stop";
    URL server = new URL("http", host, 8XXX, xyz);
    tring userPassword =Userid + ":" + Password;
       String encoding = new sun.misc.BASE64Encoder().encode (userPassword.getBytes());
        URLConnection uc=server.openConnection();
        uc.setRequestProperty ("Authorization", "Basic " + encoding);
        BufferedReader br = new BufferedReader(new InputStreamReader(uc.getInputStream()));
         while ((inputLine = br.readLine()) != null)
         output+=inputLine;
        br.close();
    catch (Exception e){}
    ERROR:
    cannot resolve symbol
    symbol : variable host location: class com.sap.xi.tf._MM_CommunicationChannel_Stop
    _ URL server = new URL("http", host, 8xxx, xyz);
    ^ 1 error
    Any other way to get host and port?
    Manisha

  • Getting host name from applet

    Hi All,
    How can i get the local host name from applet ( Host name where the applet running) . While i tried with InetAddress i got only the loop back address 127.0.0.1. Can anyone help me out in this regard.
    Thanks in advance
    V.S.Saravanan

    When you say you tried the InetAddress, did you try the following?
    You could try creating a Socket connection back to the host/server URL from where the Applet was downloaded (you should have permission to do this). You can then get the local address of the Socket.
    Something like:
    String hostName = getCodeBase();
    Socket s = new Socket( hostName, portNum );
    InetAddress address = s.getLocalAddress();
    String hostName = address.getHostName();
    Eric

  • Get host name and ip addrees of the client machine for window VISTA

    Hello Friends !!
    I have write the following code to get the ip adress and host name of the client machine ..
    it works fine for windows xp and 2000 but in vista it gives this type of out put.
    host name = 0:0:0:0:0:0:0:1
    ip addresss = 0:0:0:0:0:0:0:1
    what i have to make changes in my code to get the proper ip address and hostname for vista...
    My code is listed below....
    code ::
    InetAddress remoteAddress = null;
    // Setting Host Name...
    request.setAttribute("reportHostIP", request.getRemoteAddr());
    // Setting Host IP Address...
    try
         remoteAddress = InetAddress.getByName(request.getRemoteAddr());
         //This will give you the full qualified domain name of the client
    request.setAttribute("reportHostName", remoteAddress.getCanonicalHostName());
    catch(Exception e)
         logger.error(e.getMessage(), e);
    }

    BIJ001 wrote:
    Is it not IPv6 by any chance?It is. And if I remember correctly, then "0:0:0:0:0:0:0:1" (or "::1" for short) is the IPv6-equivalent to "127.0.0.1", i.e. it's the loopback device.

  • 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 Host Name Domain Name : Port No. for App Server From Forms

    Forms 10g r2
    I am looking to run various forms and reports from within a form. I am using web_show_document. I am passing the URL which includes "http://{host name . domain name : port number}/forms/frmservlet?config=schema1_schema2 form=ab0001 p_param1=151 p_param2=1409 p_x=X". My schema1_schema2 config section in formsweb.cfg contains user name, password, connection information.
    All works well when the actual host_name.domain_name:port_no are hard-coded within a string that is used for the URL with web_show_document, but I need to be able to distribute the form without hard-coding the host_name, domain_name, and port_no.
    I have looked in forms help for application properties, system variables, and within this forum for the built-in or system variable that returns this information, but have not found it.
    Can someone please tell me how I can get this information (host_name, domain_name, and port_number for the application server on which the form is currently running) so that I can build this working URL dynamically?
    I appologize if I have overlooked it within this forum.
    Thanks greatly,
    James

    Thanks, Rosario.
    As it turns out, I don't need the IAS Host_Name, Domain_name, and Port_No. Instead, I can do what I described by stripping off precisely THAT information leaving a URL that looks like:
    v_url := "/forms/frmservlet?config=schema1_schema2 form=ab0001 p_param1=151 p_param2=1409 p_x=X";
    WEB.SHOW_DOCUMENT(v_url,'_blank');
    The original IAS Host_Name, Domain_Name, and Port_No. are assumed and the named config -- schema1_schema2 is still properly referenced so as to use the username/password and connect string to the 2nd schema. This is done by use of the relative path.

Maybe you are looking for