I have two applications:
   1. basic web.xml based servlet application running on instance X web server 1 - http://localhost:8080/Route.Js
So from the application 1, Js file we need decision-making process to send/redirect to angular application. I have tried the following options.
Option1:
var xhr = new XMLHttpRequest();
 xhr.open("GET", "http://localhost:4200/Primary", true);
 xhr.withCredentials = true;
 xhr.send();
Option 2:
  jQuery.ajax({
            url : "http://localhost:4200/Primary",
            type : "POST",
            cache : false,
            async : false,
            success : function(data, textStatus, jqXHR)
            {
                alert("sucess..");
            },
            error : function(jqXHR, textStatus, errorThrown)
            {
                alert("failure..");
            }
        });
Option2 throws following error:
          XMLHttpRequest: Network Error 0x80070005, Access is denied.
I tried lot on online but now sure how to solve this issue? Thanks in advance
 Will Mcavoy
 Will McavoyUser contributions licensed under CC BY-SA 3.0