Open a web page from Oracle

plz, i use oracle 10g but how can i open/ping a web URL from pl/sql code?

Thank you venky but you should post the link as link and not between tags !
[Re: Opening a web page from oracle
SS                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Opening a web page from oracle

    Hi ,
    How can i open a web page example : "www.yahoo.com" from pl/sql ?
    One more thing , if this was possible is there a way to provide the username/password to the website to be logged on right when the page is browsed ?
    also how does Oracle know of the browser that is going to be used ?
    Thanks...

    CREATE OR REPLACE PROCEDURE show_url
        url      IN VARCHAR2,
        username IN VARCHAR2 DEFAULT NULL,
        password IN VARCHAR2 DEFAULT NULL
    ) AS
        req       utl_http.req;
        resp      utl_http.resp;
        name      VARCHAR2(256);
        value     VARCHAR2(1024);
        data      VARCHAR2(255);
        my_scheme VARCHAR2(256);
        my_realm  VARCHAR2(256);
        my_proxy  BOOLEAN;
    BEGIN
    -- When going through a firewall, pass requests through this host.
    -- Specify sites inside the firewall that don't need the proxy host.
      utl_http.set_proxy('proxy.my-company.com', 'corp.my-company.com');
    -- Ask UTL_HTTP not to raise an exception for 4xx and 5xx status codes,
    -- rather than just returning the text of the error page.
      utl_http.set_response_error_check(FALSE);
    -- Begin retrieving this Web page.
      req := utl_http.begin_request(url);
    -- Identify ourselves. Some sites serve special pages for particular browsers.
      utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0');
    -- Specify a user ID and password for pages that require them.
      IF (username IS NOT NULL) THEN
        utl_http.set_authentication(req, username, password);
      END IF;
      BEGIN
    -- Start receiving the HTML text.
        resp := utl_http.get_response(req);
    -- Show the status codes and reason phrase of the response.
        dbms_output.put_line('HTTP response status code: ' || resp.status_code);
        dbms_output.put_line('HTTP response reason phrase: ' || resp.reason_phrase);
    -- Look for client-side error and report it.
        IF (resp.status_code >= 400) AND (resp.status_code <= 499) THEN
    -- Detect whether the page is password protected, and we didn't supply
    -- the right authorization.
          IF (resp.status_code = utl_http.HTTP_UNAUTHORIZED) THEN
            utl_http.get_authentication(resp, my_scheme, my_realm, my_proxy);
            IF (my_proxy) THEN
              dbms_output.put_line('Web proxy server is protected.');
              dbms_output.put('Please supply the required ' || my_scheme ||
                ' authentication username/password for realm ' || my_realm ||
                ' for the proxy server.');
            ELSE
              dbms_output.put_line('Web page ' || url || ' is protected.');
              dbms_output.put('Please supplied the required ' || my_scheme ||
                ' authentication username/password for realm ' || my_realm ||
                ' for the Web page.');
            END IF;
          ELSE
            dbms_output.put_line('Check the URL.');
          END IF;
          utl_http.end_response(resp);
          RETURN;
    -- Look for server-side error and report it.
        ELSIF (resp.status_code >= 500) AND (resp.status_code <= 599) THEN
          dbms_output.put_line('Check if the Web site is up.');
          utl_http.end_response(resp);
          RETURN;
        END IF;
    -- The HTTP header lines contain information about cookies, character sets,
    -- and other data that client and server can use to customize each session.
        FOR i IN 1..utl_http.get_header_count(resp) LOOP
          utl_http.get_header(resp, i, name, value);
          dbms_output.put_line(name || ': ' || value);
        END LOOP;
    -- Keep reading lines until no more are left and an exception is raised.
        LOOP
          utl_http.read_line(resp, value);
          dbms_output.put_line(value);
        END LOOP;
      EXCEPTION
        WHEN utl_http.end_of_body THEN
        utl_http.end_response(resp);
      END;
    END;
    SET serveroutput ON
    -- The following URLs illustrate the use of this procedure,
    -- but these pages do not actually exist. To test, substitute
    -- URLs from your own Web server.
    exec show_url('http://www.oracle.com/no-such-page.html')
    exec show_url('http://www.oracle.com/protected-page.html')
    exec show_url('http://www.oracle.com/protected-page.html', 'scott', 'tiger')Reference
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_web.htm#BGBGBFJJ
    !http://download.oracle.com/docs/cd/B19306_01/dcommon/gifs/oracle.gif!

  • Opening a WEB page from FORMS CS & WebForms

    Hi,
    We would like to open a Web Page from a forms running in
    client/server as well as from a form runningover the web.
    Over the web, we plan to use SHOW_DOWUMENT (Even tough it seems
    broken, on forms 6.0, the only way we have got it working was by
    using the parameter that overwrites the current page (the form),
    we cannot have it open an URL in another window)
    In C/S mode, the SHOW DOCUMENT does not work. What is the proper
    way to lauch an URL in a browser in C/S mode ?
    Is there a way to determine if we're running in CS mode or Web
    Mode ? We would like to use the same code both on the web and in
    C/S
    Example pseudo code:
    if (Running in CS Mode) then
    open the URL using C/S method
    else
    open the URL with show dowument
    fi
    Thanks
    null

    use '_blank' as parameter, not '_self'.
    Guy Dallaire (guest) wrote:
    : Hi,
    : We would like to open a Web Page from a forms running in
    : client/server as well as from a form runningover the web.
    : Over the web, we plan to use SHOW_DOWUMENT (Even tough it
    seems
    : broken, on forms 6.0, the only way we have got it working was
    by
    : using the parameter that overwrites the current page (the
    form),
    : we cannot have it open an URL in another window)
    : In C/S mode, the SHOW DOCUMENT does not work. What is the
    proper
    : way to lauch an URL in a browser in C/S mode ?
    : Is there a way to determine if we're running in CS mode or Web
    : Mode ? We would like to use the same code both on the web and
    in
    : C/S
    : Example pseudo code:
    : if (Running in CS Mode) then
    : open the URL using C/S method
    : else
    : open the URL with show dowument
    : fi
    : Thanks
    null

  • Opening a secure web page from oracle forms for credit card validation

    Hi All,
    I searched for the topic in the forms forum but couldn't find a solution.
    Requirement: As per some compliance, our application cannot do a credit card validation from our forms application, instead we need to use a java code which a third party will provide ,it's an iframe (they say, i am layman when it comes to Java, don't know what is it), but they say that, within your forms application you call our iframe do the credit card validation over there get a token of response back from us and use this token as a confirmation in your application.
    Problem: I could not find a solution anywhere wherein i can call a web page from forms. Now, this web page should be modal, i.e. unless i close this page i cannot access my forms application. Please guide me if anyone has done that.
    Secondly if i could make it work, how will i communicate with this external web page, like getting back some token value and use it back in my forms application. I am completely clueless.
    As we are using Oracle designer for generating forms, we cannot use a bean type thing as designer does not have the bean-item type defined!
    Appreciate if anyone could provide me pointers for a solution to this problem statement.
    We are on forms 9i -- Version 9.0.2.11.0
    Edited by: the_wing_rider on Jul 8, 2011 5:10 AM

    The simple way to do it is to use a PJC (java bean) + apache httpclient library..
    If you have a webservice than you can use Axis library and wsdl2java to create java classes from wsdl.
    also you can use httpclient library to simulate http protocol (request/response actions)..
    (for example.. you have a credit card number.. you post this number to specified URL and then you parse the response from credit card validation server)..
    Post here some documentation (specification) on how to call the credit card validation .. (maybe it's a secure webservice?)
    Here you have a httpclient library documentation:
    http://hc.apache.org/httpcomponents-client-ga/tutorial/html/index.html
    Also you can implement bean area in designer.. If you need help I can post here how we do it in our project..
    also look here: Call webservice from PJC over https protocol
    regards
    Peter
    Edited by: Peterv6i on Jul 8, 2011 3:35 PM

  • Opening a web page from a JButton

    Dear all,
    I'm trying to program a JButton from my GUI program that will open up a web page on Microsoft Internet Explorer window.
    Can anyone tell me how to do this?
    Regards,
    Raheal

    Try the DOS "start" command:If all else fails,
    import java.lang.reflect.Method;
    import javax.swing.JOptionPane;
    public class test {
        public test() {
         public static void main(String[] args) {
          String osName = System.getProperty("os.name");
          String url = "http://www.slashdot.org";
          try {
             if (osName.startsWith("Mac OS")) {
                Class fileMgr = Class.forName("com.apple.eio.FileManager");
                Method openURL = fileMgr.getDeclaredMethod("openURL",
                   new Class[] {String.class});
                openURL.invoke(null, new Object[] {url});
             else if (osName.startsWith("Windows"))
                Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
             else { //assume Unix or Linux
                String[] browsers = {
                   "gnome-open", "firefox", "opera", "konqueror", "epiphany", "mozilla", "netscape" };
                String browser = null;
                for (int count = 0; count < browsers.length && browser == null; count++)
                   if (Runtime.getRuntime().exec(
                         new String[] {"which", browsers[count]}).waitFor() == 0)
                      browser = browsers[count];
                if (browser == null)
                   throw new Exception("Could not find web browser");
                else
                   Runtime.getRuntime().exec(new String[] {browser, url});
          catch (Exception e) {
             JOptionPane.showMessageDialog(null, e.getLocalizedMessage());
    }

  • How to open a web page from a BSP ? Or swap from the actual URL to another?

    Hi,
    I have a BSP, executing some data loading. It works fine.
    I am trying to enhance it by adding a call to another URL, at the end of the program.
    The same code works when I execute it from transaction SE38. However, when this is executed from the BSP itself, the return code of the function CALL_BROWSER is 2.
    I made som debugs, and the CALL_BROWSER function executes another function which is WS_QUERY. And there, SAP seems not being able to find wich system it is running on.
    Has someone done that before?
    Here is the code of my BSP (the same that works in SE38):
    DATA : appname      TYPE string,
           ls_page_name TYPE string,
           cb_true      TYPE boolean,
           cb_false     TYPE boolean,
           url          TYPE string,
           c_url(2054)  TYPE c.
        MOVE : 'ZPC_STKVTES'     TO appname,
               'zpc_stkvtes.htm' TO ls_page_name,
               'X'               TO cb_true,
               '-'               TO cb_false.
        CALL FUNCTION 'UPWB_GET_APPLICATION_URL'
          EXPORTING
            application          = appname
            page                 = ls_page_name
            ib_additional_params = cb_true
            ib_in_subgui         = cb_false
            ic_preview_type      = 'B'
          IMPORTING
            url                  = url.
        CONCATENATE url '&bps-design_messages=X' INTO c_url.
        CALL FUNCTION 'CALL_BROWSER'
          EXPORTING
            url                    = c_url
            window_name            = ' '
            new_window             = 'X'
          EXCEPTIONS
            frontend_not_supported = 1
            frontend_error         = 2
            prog_not_found         = 3
            no_batch               = 4
            unspecified_error      = 5
            OTHERS                 = 6.
    Regards
    Laurent
    Message was edited by: Laurent THIBERT

    > Thanks, but can I use such technology within Abap?
    YES with report programs or dialog programs but not in BSP framework
    > I use the Event OnProcessing of the BSP to execute
    > many tasks, and then only I want to open or swap to
    > antoher URL.
    in that case you can either use
    navigation->goto_page(<url>) .
    or if you want to open the page in a new window.
    inoninputprocessing after all your processing done youc an set a varialbe say opennewwindow = 'YES'
    and in the layout write this code.
    <% if opennewwindow = 'YES' . %>
    <script>
          window.open( '<%= url %>', target='_balnk');
          </script>
    <% endif . %>
    Regards
    Raja

  • Suddenly I am unable to open a web page from a link in an email (eg notification from facebook) - usually have to unistall and then re-install but this is a nu

    without any changes i am aware of, firefox suddenly stops opening from links in emails (thunderbird).
    e.g. notifications from facebook.
    Usually when this occurs I un-install and then re-install firefox and that fixes the problem but of course it interrupts what I'm doing and takes time. Is there a known cause and fix for this failure to open?

    Make sure that Firefox is set as the default browser.
    *http://kb.mozillazine.org/Default_browser
    *https://support.mozilla.org/kb/How+to+make+Firefox+the+default+browser
    *https://support.mozilla.org/kb/Setting+Firefox+as+the+default+browser+does+not+work

  • Problem opening live web page (url) from within keynote

    hi.
    i encountered this problem during a recent presentation. i have a standard two-monitor set-up, on my laptop viewing notes etc and presenting on the attached monitor. the transitions between my slides are all set onClick.
    so, when i encounter a hyperlink in my presentation (of the web page type), when i click on it, i am not taken to the web page, but rather to the next slide.
    how do i avoid this? how do i make keynote follow the hyperlink -- i.e. open the webpage during the presentation?
    many thanks in advance for your tips.

    use '_blank' as parameter, not '_self'.
    Guy Dallaire (guest) wrote:
    : Hi,
    : We would like to open a Web Page from a forms running in
    : client/server as well as from a form runningover the web.
    : Over the web, we plan to use SHOW_DOWUMENT (Even tough it
    seems
    : broken, on forms 6.0, the only way we have got it working was
    by
    : using the parameter that overwrites the current page (the
    form),
    : we cannot have it open an URL in another window)
    : In C/S mode, the SHOW DOCUMENT does not work. What is the
    proper
    : way to lauch an URL in a browser in C/S mode ?
    : Is there a way to determine if we're running in CS mode or Web
    : Mode ? We would like to use the same code both on the web and
    in
    : C/S
    : Example pseudo code:
    : if (Running in CS Mode) then
    : open the URL using C/S method
    : else
    : open the URL with show dowument
    : fi
    : Thanks
    null

  • Invoke a web page from form 6i

    How can I invoke a web page from Oracle Forms 6i. The web built in has show_document but it only works with a form run from the web. Our forms are not deployed on web. Can anyone help???

    The command works except there's one problem. Once explorer is launched, it grey's out my form application screen and I can't use the application parallel with web. Once I close the browser then the control is returned back to form.
    Does any one know is it is possible to launch the web as well as not leave control from forms application. At this point I'm working with a work around to open another instance of application which is kinda not neat.
    Pleaseeeeeeee help.

  • How to customize an existing OAF page from Oracle, change it and reload it

    Hello all Oracle Developers,
    I am having a question regarding to customization, basically I am going to follow a very simple example.
    We have form: APXVDMVD and OAF web Page AP_APXVDMVD.
    Applying all our custom code via forms personnalisation is piece of cake. However trying to apply the same code to OAF web Page AP_APXVDMVD
    is a total back box for us.
    The basic example seems like this: Suppose that in the Suppliers/Vendors Page we type the supplier name and then right after that we populate in consequence all the fields:
    Taxpayer ID, Tax Registration Number, DUNS Number
    We want to grab the OAF Web page from oracle apply the custom code in java code or whatever necessary to make it work and deploy it onto the server.
    Is this achievable, if so how we can do it??? Can we grab the web page extend the classes that are necessary and deploy the solution. The demo provided from Oracle
    is showing how to create pages from zero, however Oracle have not provided how to grab an existing applications page, put the code and the deploy it
    Let me know any inputs, whatever you did and surely we will be sharing the same stuff all migration R12 long :-)

    Hi,
    You can extend OA framework pages and customize them. There is also a section for customizations in the OA Framework Developer's guide. IF this requires extensive customizations, Iwould advice to be very careful as any extensions should not interfere with the base logic of the pages. Please post here if you need more details.
    The following blog is a good one for some examples.
    http://oracle.anilpassi.com/oa-framework-extending-controller-steps-2.html
    There is also a course for the same if you are interested.
    http://education.oracle.co.uk/html/oracle/15946US/D18280GC10.htm
    Hope this helps..

  • Open the web page

    Hi
    I am not exept in plsql..
    How to open the web page in oracle pl/sql with procedure.
    regards,
    sasi

    Hi,
    There is a dedicated forum for PL/SQL questions, please post your question in that forum for a better/faster response.
    SQL and PL/SQL
    PL/SQL
    Thanks,
    Hussein

  • Open web page from applet

    Hi guys,
    I am new to Java applet and I need your help. I want to open a web page (or a servlet) with known URL from an applet when I press a button. I know how to set up HttpURLConnection for the applet. But I don't how to open this web page. Could you please help me? What method I should use?
    Many thanks in advance.
    jh

    getAppletContext().showDocument(URL url)
    You should search the forum and then post over here. Also go through the api.

  • TS3276 i am unable to open web pages from email links on my ipad

    I am unable to open web pages from email links on my ipad

    A few more details might help, if nobody else recognizes this.   
    What happens when you try to open the links?
    Can you post an example of a link that doesn't work?
    Is there any particular source for the mail with the (bad) links, or is mail from all sources failing?
    If you happen to know it, what's the format of the mail message?  (Maybe the message is an image?)
    Do the embedded links work as expected from an OS X system running Mail.app, or some system and some other other mail client?
    To view the link in iOS: if you press on and hold your finger on an embedded link in most contexts, iOS will show a pop-up with the link contents, and will offer to copy it.  You can use that to acquire and post the link.  If pressing and holding on the link doesn't offer the pop-up, the format of the link itself may not be valid, or it might not really be a link.

  • How to open web pages from japplet??

    Hi
    Does anybody know how to open web pages from java japplet??
    Any help is apreciated!
    zick

    the getAppletContext() method of the Applet class will get you an AppletContext, with which you can call the ShowDocument(URL url) or ShowDocument(URL url, String target) method...
    check it out at http://java.sun.com/j2se/1.4/docs/api/java/applet/AppletContext.html
    have a good one :)
    Jay

  • Opening a web page in a new tab appear web page from the history

    When I like to open a web page in a new tab, is opening a BLANK page and in the new tab's address bar appear a random web page address from history .

    Try performing a clean reinstall.
    Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!
    Thanks,
    cyborg4

Maybe you are looking for

  • How do I get a button to launch a new frame within a frame?

    I'm very new to Java and am using Jdeveloper9i. I am writing a stand alone application that has a frame with fields e.g. name, emailid etc and have provided a "Modify" button, which I want to call up another frame/panel with text fields to allow the

  • Can't get rid of music videos in music section

    Well, frankly, I know this is possible, because I did it on my other account, but I forgot how. Basically, when I put any videos into the designated Music Videos section in iTunes, it also automatically puts a file into the Music section. How do I ge

  • Running function mdule CUSTOMER_UPDATE

    I am running Function Module CUSTOMER_UPDATE to update the payment block field in the customer master. I am populating the following fields in the FM; KUNNR BUKRS ZAHLS I leave the other fields blank. But when I run the FM, it removes the values from

  • I am new to adobe so forgive me if I should know answer ? lifecycle

    I am trying to make a form in Lifecycle which will have multiple document. I may not print all of the pages all of the time so i need some infomation like persons name to be on all of the forms? I am hoping I can set it up so once I type the name on

  • FCPX wont't allow me to leave media in place

    I already have a folder of media on the same drive.  When I go to import the files, FCPX has add to library selected and won't let me select "leave in place".  Is there a preference or setting somewhere that will let me reference the files? Thanks, P