java - Accessing cross-domain intranet cookies -



java - Accessing cross-domain intranet cookies -

i own 2 domains, , b, hosted web applications. application in domain a, phone call service in b, takes time. show loading gif.

in service in b, set cookie along response in java:

class="lang-java prettyprint-override">httpresponse resp; cookie filedownloadstatus = new cookie("filedownload", "true"); filedownloadstatus.setpath ("/app"); filedownloadstatus.setdomain("x.x.x.x"); resp.addcookie(filedownloadstatus);

in a, maintain looking cookie, can stop loading gif, unable cookie in javascript, though tried setting path of cookie , domain cookie if sent a:

class="lang-javascript prettyprint-override">var filedownloadchecktimer; filedownloadchecktimer = window.setinterval(function () { var cookies = document.cookie; console.log(cookies); var cookiearray = cookies.split(';'); console.log(cookiearray); for(var i=0;i<cookiearray.length;i++) { var reqcookie = cookiearray[i].split('='); console.log(reqcookie); if(reqcookie[0]=="filedownload") { if(reqcookie[1] == "true") finishdownload(); } } }, 1000);

please assist.

java javascript httpcookie

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -