oracleoracle-apex

How to redirect to another url using : owa_util.redirect_url?


I have an Apex 21.1.3 Page.

In the page I have a Before-Header Process with the code :

owa_util.redirect_url('https://www.google.com');
apex_application.stop_apex_engine;

When I run the page, it doesn't redirect, it shows instead the text : Location: https://www.google.com

enter image description here

I have the exact same code in an 19.2 Apex Application and it works correctly.

How can I solve that?


Solution

  • Use this instead:

    apex_util.redirect_url (p_url => 'http://www.google.com/');
    

    I mean, only this; you don't have to stop the engine, REDIRECT_URL will do it itself.