I am using Oracle Apex 5.1. In that application I need to access Oracle ADF application from Oracle Apex. I used Iframe to view the ADF application from Apex. Since I logged in Oracle apex, I don't want to login it again in ADF application. So I tried to auto login while loading the page using AJAX post method. Browser doesn't allow the request due to cross domain access issues. If any possible way to auto login or where I am going wrong in the code, please help me. Thanks in advance.
Code used to login in Ajax:
$.ajax({
url: 'https://xxxxxx.co.xx:7302/xxxx/faces/pages/login/login.jspx',
data: {j_username: "xxxxx",j_password:"xxxxx"},
type: 'POST',
crossDomain: true,
dataType: 'text/html',
success: function() { alert("Success"); },
error: function() { alert('Failed!'); },
headers: {
'Access-Control-Allow-Origin': '*'
}
});
The Error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://xxxxx.co.xx:7302/xxxx/faces/pages/login/login.jspx. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
If any possible way to auto login, please help me. Thanks in advance.