How to test an external URL to determine the return value

Hello

I would like to create a page in my apex-application for external monitoring of different URLS.
When one of the external sites is affordable I show a green spot on my apex page for that URL. And when he is not available, it should show a red spot.

Right now I use a URL-region with the source 'http://...:8888/test.html '. The value of which is to give back to the my apex-page is "oke", because that's what index.html.

But when the site isn't here it returns "Not Found. Test1.html requested URL was not found on this server. »

My question is how can I check the value of the URL area?

Reg.
Chris

Using UTL_HTTP package try.
You can read the page www inside the oracle, if error return request, you can assign red spot another Green site.

Tags: Database

Similar Questions

  • How to test a VO to Junit, if the session value is required for an attribute

    Hello

    I use JDeveloper 11.1.2.2

    I wrote a few test cases for a few VO to Junit. Both of my VO need current user from the session object, insert values into certain attributes in the table.

    While running the Junit test case unit can create a session so that I can give you those session values in these attributes?

    Thank you

    Nigel.

    Hello

    If the authentication in ADF is your concern, have a look here:

    ADF BC: SecurityContext delete SecurityEnv.JAAS_SUBJECT

    In general, other that the user authentication via the security context of ADF, addictive web session in the service pane business is considered bad coding practice because it binds the model to the web client.

    Frank

  • How to test if a URL is valid in Actionscript 3.0?

    HY, everyone!
    I'm trying to make a function that tests whether a URL is valid and returns true if it is, false otherwise, so that I can use it in a statement "if".



    The I try to do is using two event listeners for the property "contentLoaderInfo' of a charger: one for Event.OPEN (if this event is dispatched, so I know that the URL is valid) and one for IOErrorEvent.IO_ERROR (if this event is dispatched, so I know that the URL is not valid).
    But the problem is that by using event handler functions, I leave the main Tester URL function and am unable to return a value from it. The way I thought to get around this was to set a variable for returnValue, which the return value of both the event handler works and then just go "return returnValue; But I do not know how to return a value from a function handler events, and even if I did I still couldn't do it this way, because it takes time to send events and the variable 'returnValue' would be undefined at the point where I try to return it.
    I hope you understood what I tried to explain above. Here is some code to illustrate this better (it is not valid, that it's just so that you understand my problem):

    private void testUrl(url:String):void {}
    var returnValue:Boolean;
    var loader: Loader = new Loader();
    returnValue = loader.contentLoaderInfo.addEventListener (Event.OPEN, onGoodUrl);
    It is a global variable which I assigned the value of "loader" so that I can farm onGoodUrl
    _testLoader = loader;
    returnValue = loader.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, onBadUrl);
    Loader.Load (new URLRequest (url));
    Even if I knew how to do an event handler that returns a value, I still have to wait for loading to start, and I couldn't return the value here:
    return returnValue;
    }

    private void onGoodUrl(event:Event):Boolean {}
    _testLoader.close ();
    // ???
    Returns true;
    }

    private void onBadUrl(event:IOErrorEvent):Boolean {}
    // ???
    Returns false;
    }



    You know a way around this problem? Or, for that matter, you know another way to test a valid URL?

    Thank you for your time!

    You should test the httpStatus of the URLLoader. Streaming content is undergoing a specific process at entry into Flash. The only problem with httpStatus, is that it does not work for all browsers, especially systems based on Linux and any programs on the evolutionary food chain. I didn't have problems with IE or NS/FF on Vista at this stage.

    1. send the request

    2. receive the HTTP (HTTPStatusEvent.HTTP_STATUS) status

    3A. good condition - Begin Load (Event.OPEN)
    3 b. bad condition - 404 or protected classified (IOErrorEvent.IO_ERROR)

    4 receive files - download (ProgressEvent.PROGRESS)

    5 DOWNLOAD Complete (Event.COMPLETE)

  • The drafting of emails is small (like this) how do I expand while it remains high (the default value)?

    How to enlarge type size ansd save as default (e-mail)

    The drafting of emails is small (like this) how do I expand while it remains high (the default value)?

    I use gmail.  Browser is Firefox.

    Is not a Microsoft program, I did some work for you leg.
    http://lmgtfy.com/?q=http%3A%2f%2Femail.about.com%2Fod%2Fgmailtips%2Fqt%2Fet_font_size.htm&l=1

  • Error: Could not determine the returned PID of launch

    Hello, I have this error in my Alpha camera

    Download and launch the application... "has encountered a problem.

    Impossible to determine the returned PID of launch

    When I change something between the user interface sometimes I get this error.

    I know this is an alpha of the device and I do not get errors, but this one is really annoying because the only option I have is to restore the operating system, whenever this error, and it's a lot of time.

    Please if anyone has a patch 'temporary' for this problem will be asked because it breaks my development in my application every time.

    PD: I'm using the latest version of the SDK and the latest version of the operating system

    Thank you

    Use the wifi, no usb, debugging and for now no PID more. I don't know why.

  • How to set the return value of the method to the /outputText inputText field

    Hello

    How to set output return value method of a /outputText adf inputText field

    Concerning

    sevanan

    Well put method's return value to a managed bean variable.

    Create a variable in the bean and set the return value to this variable.

    the inputText and outputTextValue to this managedBean.variable value

    That's all...

    and add partial trigger for inputText programmaticly

  • [JS CS4/CS5/CS5.5] How to get the return value from Javascript using doScript

    Hi all

    I'm calling javascript from COM (c#) and it works fine. Passing parameters to javascript and playback by using the syntax of the [x] arguments also works very well.

    What I can't seem to get to work is to know how to move something from javascript to the calling COM Summoner, in this case, c#. How and where should I place the return value in javascript?

    Thanks in advance.

    Rachiud

    doScript() evaluates an expression, so just make sure that your Javascript is an expression.

    For instance "(3 + 3)" 6 "

  • How to get the return value from Java runtime.getRuntime.exec?

    I am running shell from a (GR 11, 2) Oracle database commands on aix.
    But, I would get a return value of a shell comand... as you get with "echo $?"

    I use a code like
    CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS
    import java.io.*;
    public class Host {
      public static int executeCommand(String command) {
        int retval=0;
        try {
            String[] finalCommand;
            finalCommand = new String[3];
            finalCommand[0] = "/bin/sh";
            finalCommand[1] = "-c";
            finalCommand[2] = command;
    
          final Process pr = Runtime.getRuntime().exec(finalCommand);
          pr.waitFor();
    }
       catch (Exception ex) {
          System.out.println(ex.getLocalizedMessage());
          retval=-1;
        }
        return retval;
    };
    /
    but I do not get a return value... because I don't know how to get the return value...

    Published by: user9158455 on 22-Sep-2010 07:33

    Hello

    Your pr.exitValue () has tried?

    I think you also need a finally block that destroys the sub-process

    Concerning
    Peter

  • How to get the return value of the method by calling the stored procedure in ApplModuleImpl

    Hello

    I use Jdev 10.1.3.4
    JSF, and ADF business components
    I created a service method in the implementing class of module request to execute the strored procedure in the database.
    This breeding returns a string value.
    now, I slipped the method of service of data control palette on my JSF page and chose ADF parameter form when I droped.
    It works very well.
    now, I want to display the string returned by the method of service after the execution on the JSF page as global messages.
    How can I achieve this.
    Help, please

    Thanks in advance

    Kind regards
    Ajit Agarwal

    Hello

    You must run programmatically run the method binding. If I'm not wrong then the following code will allow you to access the return value

    OperationBinding oper = bindings.get("MyPLSQLAccessMethodBinding") (OperationBinding);
    String returnValue = oper.execute ((String));

    Once you have the string in a managed bean you can add it to the stack of messages JSF exposed by the FacesContext

    Frank

  • How to add an external url link to a navagation button in Dreamweaver Cs5.5

    How or can I add an external url link to a navagation button in Dreamweaver Cs5.5. If I try the link/properties it says that the link is an html element and not a css...

    Thank you

    Binding is done in HTML, not CSS (with the exception of a link to a background picture)

    So, if your navigation is a list, you should have the following in your HTML code:

    Here, in the example above, I use the

  • How can I change a URL to include the parent page?

    How can I change the URL to include the parent Muse page?

    for example my URL is www.splinterd.com/kauri.html and I need to be www.splinterd.com/store/kauri.html

    I have the page of kauri sitting under store (such as a child page) Muse page.

    I have an online marketing person asking it is set like this to help with google rankings / SEO.

    Thank you!

    Hello mariac,.

    This can actually be set up by your FTP host.

    Please go to them like asking the necessary changes to the file system of your web site.

    Thank you

    Ankush

  • How to use an external webcam instead of the construction in the Sat A215-4757

    I would like to connect a webcam Genius instead of building behind closed doors to get better angles to capture. Could intall gentle Genius, but images still come from the construction in camera. Tried to disable built in camera but activate camera Genius, but no image has been shown.

    Please any help, thanks.

    Edgardo, buenos aires

    Hello

    What applications do you use to use the other external webcam?
    Generally, if more then one device has been installed, you must choose and activate the right one.
    The same phenomenon occurs if multiple printers are installed on the OS. You must first enable one and assign it as the default value.

    Check if you can mark your external webcam installed as default webcam.

  • How to determine the Boolean value selected in a mouse down event pane?

    I have a lot of Boolean controls and indicators in my VI and I would determine what boolean is selected (left click) on a mouse down event pane.  Can I do this without having to specify each of the Boolean in the case of event configuration?

    Thank you.

    Jim

    If you get a ref to your Boolean all they have properties that define it location and size. Compare the location click with the limits of each boolean and where

    Left< click=""><>

    AND

    Back to top< click=""><>

    you have found the Boolean value that ended the click.

    It may be easier to use the Boolean refs table to create a dynamic event and then use the ref returned by the mouse down to get the label of the Boolean value that has been clicked.

    Have fun

    Ben

  • How to get the return value of INSERT... RETURN clause?

    Hello

    With the help of the WEST, how I'm supposed to retrieve the value returned by queries like:

    INSERT INTO... VALUES (...) RETURN xxx IN: res

    ?

    Thank you
    Kiril

    It works for me. Someone posted the code for him on this thread:
    BLOB vs BFILE

    I tested successfully an integer column and also return the rowid of INSERTION. Note that the call to registerOutParam is necessary - without that I just became a string vacuum back to rowid.

    I tested with 11.2 customer against 10.2 server.

  • How can I fix this error message, the address has not been understood Firefox doesn't know how to open this address, because one of the following values for protocols (connectag

    We have a new computer and I can't get my watch running from garmin for synchronization with mozilla. The error message I get is "address not was heard.

    Firefox doesn't know how to open this address, because one of the following protocols (connectagent) is not associated with any program or is not allowed in this context.

       You might need to install other software to open this address."
    

    Help please

    Hi grranchgirl, if you have an "Always enable" and "never activate?

    I don't know if the terms 'modern' and 'classic' mean anything to you, but there is a thread on the Garmin forums that might be useful - it is very long and I didn't read it all.

    https://forums.Garmin.com/showthread.php?79956-modern-Garmin-connect-mostly-doesn-t-work-in-both-Firefox-and-chrome & p = 330634 #post330634

Maybe you are looking for