title: Interaction between application deployed in two different domain in GWT
body: <p>I have an application which contains the UI code created as WAR (<code>GWT</code> application) and server side code as <code>EAR</code> deployed in two different domains(<code>8080,9090</code>) respectively. While communicating from <code>8080</code>to<code>9090</code> its sending a request and even i can see its returning the response <code>200</code>. But the client is throwing some <code>GWT</code> exception **Permission denied to access property 'document' **. Below image shows the exception thrown in fire bug.</p>
  
  <p><a href="https://i.stack.imgur.com/JxhuX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JxhuX.png" alt="enter image description here"></a></p>
  
  <p>Note: i have enabled the CORS in server 9090 see the below code added in server side code EAR</p>
  
  <pre><code>@Override
      public void doFilter(ServletRequest arg0, ServletResponse arg1,
              FilterChain arg2) throws IOException, ServletException {
  
          HttpServletRequest request=(HttpServletRequest) arg0;
          HttpServletResponse response=(HttpServletResponse) arg1;
          response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
          arg2.doFilter(request, response);
      }
  </code></pre>
  
  <p>Is there any think i need to add in GWT client UI to handle this exception.Any suggestion ?</p>