Webutil_clientinfo.get_host_name

I am using Dev 11.
I need to open outlook from an JSF form and in turn open an item in outlook whose id (Hex DEC) is stored in a table. This we have achieved in oracle forms using webutil. To achieve it in JSF page we would require the following things, which we don't know in JSF.
a) Get the host name of the client machine (webutil_clientinfo.get_host_name ; --> webutil command in oracle forms).
b) Run a command prompt from the backing bean (webutil_host.nonblocking(DOS_CMD) --> webutil command in oracle forms)
thanks
regards
Sanjay

Sanjay,
Point (b) - you are going to be "out of luck" - you aren't going to be able to open an executable on the client (where the browser is) from a backing bean (which is running on the server).
For point (a) - you can get the client hostname by this:
FacesContext.getCurrentInstance().getExternalContext().getRequest().getRemoteHost()John

Similar Messages

  • Strange problem using webutil "WEBUTIL_CLIENTINFO.GET_HOST_NAME"

    in a form in with a use (and work fine) some function of webutil (like client_get_file_name etc) i have try to use this function :
    :B0.HOST_NAME := WEBUTIL_CLIENTINFO.GET_HOST_NAME;
    where b0.host_name is a char filed of 256.
    when i try to execute this forms dons not work this lasty function and appear this error :
    wuc-015 your form must contain the following BEAN : getclient info ???
    i don't understan why ??
    in the same form all other function of webutil works fine, only this ??
    a solution ???

    I've got it
    quotation from the Webutil install guide:
    the Form has instantiated the WebUtil PJCs. This means that you cannot call WebUtil
    functions before the Forms UI is rendered. This would include triggers such as PREFORM,
    WHEN-NEW-FORM-INSTANCE and WHEN-NEW-BLOCK-INSTANCE for
    the first block in the Form.
    Likewise you cannot call functions after the UI has been destroyed for instance in POSTFORM.
    If you do need to use WebUtil at Forms startup, it is recommended that you create a timer
    with a short duration (say 1ms) in your When-New-Form-Instance trigger, then make the
    WebUtil call in a When-Timer-Expired trigger.
    Francois

  • Don't more work client_image.read_image_file if i use WEBUTIL_CLIENTINFO

    After a long time of debug of a form (it work very well for some months) i have foun d this strange thing :
    if i use in the startup form the function WEBUTIL_CLIENTINFO.GET_HOST_NAME then a form where i try to read a image from a directory with the function : client_image.read_image_file the function dos not work with the error message "PL/SQL ERROR".
    if i remove the function WEBUTIL_CLIENTINFO.GET_HOST_NAME the form became good and work very well.
    It is a BUGS ??
    JInitiator: Version 1.3.1.18
    Application server =10G
    Forms = 10G
    i may don't user the WEBUTIL_CLIENTINFO.GET_HOST_NAME but i know if there is a logic solution.
    Thank's again.

    client_image.read_image_file(vfilename,v_ending,'SR_SCREEN_SHOTS.SCREEN_SHOT'); ---- error occurs during call here
    Above code will try to:
    1. read file from client using full file name including path as user selected. (like D:/temp/...
    2. transfer it to transfer.appsrv.workAreaRoot on server. like /tmp/
    3. Read it from transfer.appsrv.workAreaRoot and load into Image item
    client_image.write_image_file(vwritefile,v_ending,'SR_SCREEN_SHOTS.SCREEN_SHOT',maximize_compression,ORIGINAL_DEPTH);
    This will try to write image from the Image Item to the path on client!.
    All values in webutil.cfg should reffer to AS folders
    transfer.appsrv.read
    transfer.appsrv.write
    transfer.appsrv.transfer.appsrv.workAreaRoot

  • Oracle.forms.webutil.capi.capifunctions bean not found

    Hi...I'm trying to pick host name using webutil through the following command behind a push button in my form:
    :Pc_Nom     :=     Webutil_Clientinfo.Get_Host_Name;
    But it gives the following error:
    oracle.forms.webutil.capi.capifunctions bean not found
    webutil_c_api.rebind_parameter will not work.
    Can u tell me where is the problem???

    Hi!
    Do you have referenced the webutil object group from the webutil.olb?
    Take a look in the java console if webutil is registred.
    Regards

  • 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

  • Getting the domain name of the Client PC using WebUtil

    Hi Guys,
    Is there a way I can find the domain name of the computer running the forms using webutil.
    I use WEBUTIL_CLIENTINFO.GET_HOST_NAME to get the client computer name. I would also need the domain name.
    Thanks!
    Anand

    Try this:
    message(CLIENT_WIN_API_ENVIRONMENT.GET_ENVIRONMENT_STRING('USERDOMAIN'));I believe if no domain is defined, it will return the host name. Also, this obviously will only work on Windows clients.

  • How to get client machine name and IP address

    Hi,
    In my office I have one SERVER which has FORMS & Report Server installed and all the clients are accessing that application thru the following URL :
    http://OraServer:8889/forms/frmservlet
    to get the machine name I have read into a global variable like this
    SELECT USERENV('TERMINAL' ) into :global.clientname FROM DUAL;
    but obviously all the time its returning the SERVER machine name...not the name where client is accessing the program....so how can I get the client machine name..
    thanks

    Hi Frank,
    Well I am using Developer Suite 10g Release (10.1.2.0.2) ..I've gone thru the link what you have sent me and noticed that whatever updations of conf file or classpath its already there so i guess needn't to modify cause I think my release 10.1.2.0.2 has did already as webutils been bundled with it.
    Well What i did is to double click on ATTACH LIBRARY and browse the location to find webutil.pll and finally attached it...even though its showing me all the procedures like clientinfo and others...
    on my block's canvas I've put a button and used this trigger to get client info function like this.
    when-button-pressed trigger of INFOBUTTON
    DECLARE
    o_clientinfo varchar2(50) := Webutil_clientinfo.GET_HOST_NAME ;
    begin
    message(o_clientinfo);
    end;
    but when I am trying to open this form its simply not showing up..strange thing is that there is no error as well...so plz kindly guide me how to get clientinfo hostname or ipaddress using that library function.
    thanks

  • Error in webutil fmb

    hi,
    when i compille the webutil fmb .
    error occured on prc
    PROCEDURE GET_CLIENTINFO IS
    BEGIN
    :CLIENTINFO.USER_NAME := webutil_clientinfo.get_user_name;
    :CLIENTINFO.IP_ADDRESS := webutil_clientinfo.get_ip_address;
    :CLIENTINFO.HOST_NAME := webutil_clientinfo.get_host_name;
    :CLIENTINFO.OPERATING_SYSTEM := webutil_clientinfo.get_operating_system;
    :CLIENTINFO.JAVA_VERSION := webutil_clientinfo.get_java_version;
    :CLIENTINFO.PATH_SEPERATOR := webutil_clientinfo.get_path_separator;
    :CLIENTINFO.FILE_SEPERATOR := webutil_clientinfo.get_file_separator;
    :CLIENTINFO.LANGUAGE := webutil_clientinfo.get_language;
    :CLIENTINFO.TIME_ZONE := webutil_clientinfo.get_time_zone;
    :CLIENTINFO.DATE_TIME := webutil_clientinfo.get_date_time;
    END;
    component get_path_separator must be declared.
    2.when i open the webutil canvas, i got the error "oracle.forms.webutil.clientinfo.getclientinfo"

    have you signed the .jar files and included the jar files in the formsweb.cfg, .env. Also just run the create_webutil_db.sql in the database.
    i think this will solve the problem.

  • WebUtil screen appeared everytime

    Hi,
    WebUtil is working in my form but every time webutil block appeared for few seconds when run it.
    I want to avoid it.
    Please help
    regards.

    Hi !
    My form structure is
    MISTREE
    | Triggers
    | When-New-Form-Instance
    | When-Timer-Expired
    | Alerts
    | Attached Libraries
    | WebUtil
    | Data Blocks
    | WebUtil <----> This block is created by Form
    | KB
    | Triggers
    | When-New-Block-Instance
    In When-New-Form-Instance Trigger
    declare
         m number;
         y number;
         tmr timer;
    begin
    select to_number(to_char(sysdate,'mm')),to_number(to_char(sysdate,'yyyy')) into m,y from dual;
    if m between 1 and 3 then y:=y-1; end if;
    :global.facyr:=to_date('0104'||trim(to_char(y)),'ddmmyyyy');
    :global.tacyr:=to_date('3103'||trim(to_char(y+1)),'ddmmyyyy');
    tmr:=create_timer('WAIT_FOR_WEBUTIL',200,no_repeat);
    :global.ip:='http://172.16.5.32:8889/reports/';
    end;
    in When-Timer-Expired Trigger
    begin
    if get_application_property( timer_name )='WAIT_FOR_WEBUTIL' then
    go_block('KB');
    go_item('PP');
    end if;
    end;
    in When-New-Block_Instance (KB)
    declare
         ip varchar2(50);
         un varchar2(100);
    begin
    IP:=webutil_clientInfo.get_ip_address;
    un:=webutil_clientInfo.get_host_name;
    if ip is not null then
    if ip in ('172.16.5.114','172.16.5.110','172.16.5.32','172.16.5.17') and un in ('ibmserver','laxman','nainar') then
         null;
    else
         exit_form;
    end if;
    else
    exit_form;      
    end if;
    end;
    If the WEBUTIL block is first navigation block,it runs OK.
    If the KB block is first navigation block, it shows error.
    Thank for your kind cooperation.
    Thank you very much.

  • 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

  • Want to get the Client Machine name from Oracle Forms

    Hi,
    I want to get the Client machine name from the Oracle Forms.
    I have attached web_util.pll.
    I use user_name := webutil_clientinfo.get_host_name;
    but i am getting following error - WebUtil Error:WUC-015: Your form must contain the following Bean for this function to be available: oracle.forms.webutil.clientinfo.GetClientInfo.
    Can any one help me in this!
    Thanks & Regards,
    Avinash Bhamare.
    Pune.

    Hi,
    I have written the code on when-button-pressed trigger of a push button -
    DECLARE
         user_name VARCHAR2(50);
    BEGIN
    user_name := client_win_api_environment.get_computer_name;
    message('user_name is :'||user_name);
    message('user_name is :'||user_name);
    END;
    And on clicking on this button i am getting error -
    frm-40734:Internal Error:PL/SQL error occurred
    Can any one help in this asap please!
    Thanks & Regards,
    Avinash.

  • Get Machine Name and IP Address from Air Flex App

    New to Air..... Is there a way to get the name of the machine
    and the ip address for the client running the Air application? Not
    that this matters, but the applcation would be a Flex 3 application
    built specifically to be deployed to the Air runtime. I need to be
    able to have the Air/Flex application know what the client's
    machine name and ip address is. Can this be done?
    Thanks

    Hi Frank,
    Well I am using Developer Suite 10g Release (10.1.2.0.2) ..I've gone thru the link what you have sent me and noticed that whatever updations of conf file or classpath its already there so i guess needn't to modify cause I think my release 10.1.2.0.2 has did already as webutils been bundled with it.
    Well What i did is to double click on ATTACH LIBRARY and browse the location to find webutil.pll and finally attached it...even though its showing me all the procedures like clientinfo and others...
    on my block's canvas I've put a button and used this trigger to get client info function like this.
    when-button-pressed trigger of INFOBUTTON
    DECLARE
    o_clientinfo varchar2(50) := Webutil_clientinfo.GET_HOST_NAME ;
    begin
    message(o_clientinfo);
    end;
    but when I am trying to open this form its simply not showing up..strange thing is that there is no error as well...so plz kindly guide me how to get clientinfo hostname or ipaddress using that library function.
    thanks

  • Utl_inaddr.get_host_name

    Hi,
    The following query can run on 9i successfully, but it gave error on 8i that wrong number of argument call.
    How should we run the following query on 8.1.7?
    Or what its replacement?
    select utl_inaddr.get_host_name(sys_context('USERENV','IP_ADDRESS')) from dual;
    Regards
    Bill

    select utl_inaddr.get_host_name() from dual;
    The 8i version of utl_inaddr.get_host_name takes no parameters.

  • Webutil_clientinfo.Get_Operating_System

    Hi there is a list of all the returned string from the webutil_clientinfo.Get_Operating_System ..
    I have WindowsXP and it work .. but now if have a windows 95 or a 2000 or a 2000 Server or Vista with value I will get ????
    I need to install all the operative system and test it or there is a list of all the value returned from the know operative system ???
    thank's

    I think this value is taken either from the version or the operating system. Check my computer->System properties and General tab in Windows XP and compare it with the value from webutil.
    (I think it is giving the version value like XP, 95, 2000 )
    Rajesh

  • How to load the data from excel file into temprory table in Forms 11g?

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Declare
        v_full_filename         varchar2(500);
        v_server_path           varchar2(2000);
        v_separator             VARCHAR2(1);
        v_filename              VARCHAR2(400);
        filename                VARCHAR2 (100);
        v_stop_load             varchar2 (2000);
        v_rec_error_log         varchar2(4000);
        v_error_log             varchar2(4000);
        ctr                     NUMBER (12);
        cols                    NUMBER (2);
        btn                     number;
        RES                     BOOLEAN;   
        application             ole2.obj_type;
        workbooks               ole2.obj_type;
        workbook                ole2.obj_type;
        worksheets              ole2.obj_type;
        worksheet               ole2.obj_type;
        cell                    ole2.obj_type;
        cellType                ole2.OBJ_TYPE;
        args                    ole2.obj_type;
        PROCEDURE olearg
        IS
        args   ole2.obj_type;
        BEGIN
        args := ole2.create_arglist;
        ole2.add_arg (args, ctr);                                
        ole2.add_arg (args, cols);                                   
        cell := ole2.get_obj_property (worksheet, 'Cells', args);
        ole2.destroy_arglist (args);
        END;
    BEGIN
    v_full_filename := client_get_file_name(directory_name => null
                                     ,file_name      => null
                                     ,file_filter    => 'Excel  files (*.xls)|*.xls|'  
                                                                            ||'Excel  files (*.xlsx)|*.xlsx|'                                                                 
                                     ,message        => 'Choose Excel file'
                                     ,dialog_type    => null
                                     ,select_file    => null
    If v_full_filename is not null Then
    v_separator := WEBUTIL_CLIENTINFO.Get_file_Separator ;
    v_filename := v_separator||v_full_filename ;
    :LOAD_FILE_NAME := substr(v_filename,instr(v_filename,v_separator,-1) + 1);                                
    RES := Webutil_File_Transfer.Client_To_AS(v_full_filename,"server_path"||substr(v_filename,instr(v_filename,v_separator,-1) + 1));     
    --Begin load data from EXCEL
    BEGIN
        filename := v_server_path||substr(v_filename,instr(v_filename,v_separator,-1) + 1); -- to pick the file
        application := ole2.create_obj ('Excel.Application');
        ole2.set_property (application, 'Visible', 'false');
        workbooks := ole2.get_obj_property (application, 'Workbooks');
        args := ole2.create_arglist;
        ole2.add_arg (args, filename); -- file path and name
        workbook := ole2.get_obj_property(workbooks,'Open',args);
        ole2.destroy_arglist (args);
        args := ole2.create_arglist;
        ole2.add_arg (args, 'Sheet1');
        worksheet := ole2.get_obj_property (workbook, 'Worksheets', args);
        ole2.destroy_arglist (args);
        ctr := 2;                                                     --row number
        cols := 1;                                                -- column number
        go_block('xxx');
        FIRST_RECORD;  
        LOOP       
                --Column 1 VALUE --------------------------------------------------------------------
            olearg;
            v_stop_load := ole2.get_char_property (cell, 'Text'); --cell value of the argument
            :item1 := v_stop_load;
            cols := cols + 1;                                                      
              --Column 2 VALUE --------------------------------------------------------------------
            olearg;
            :item2 := ole2.get_char_property (cell, 'Text'); --cell value of the argument
            cols := cols + 1;
            --<and so on>
        ole2.invoke (application, 'Quit');
        ole2.RELEASE_OBJ (cell);
        ole2.RELEASE_OBJ (worksheet);
        ole2.RELEASE_OBJ (worksheets);
        ole2.RELEASE_OBJ (workbook);
        ole2.RELEASE_OBJ (workbooks);
        ole2.RELEASE_OBJ (application);
    END;
    --End load data from EXCELPlease mark it as answered if you helped.

Maybe you are looking for

  • How to restart my mac?

    can i restart my imac?

  • Order of dublicated subtree in MM

    Hi folks, I have a weird problem: I map IDOCs to a JDBC structure. I use the JDBC to Insert_Update changes that are transmitted in the IDOC. Now we discovered that the absence of fields in the IDOC leads to these fields missing as well in the JDBC (o

  • Quartz Extreme on Compressor Node

    I've set up a PowerMac G5 as a compressor node (with an ATI radeon 9800). I only intend for this machine to be used to render movies so I don't have a monitor for it. Instead I control it through a second Mac with VNC. Since I don't have a monitor at

  • How to change "Date Added" to "Date Modified"in Open a File dialoge

    Ever since updating IOS to the latest version the option to sort by "Date Modified" in the open a file dialog has been changed to "Date Added". How can I change this back to "Date Modified"?

  • Do you see problems with text size when importing from Photoshop?

    Hi all - We're working on improving some things in the Photoshop-to-Reflow workflow, and right now specifically investigating trouble with imported text. Aside from the desire to have support for local fonts, are there any problems you run into when