title: Add Access-Control-Allow-Origin to Web Service
body: <p>I have a webservice like: </p>
  
  <pre><code>@Controller
  @RequestMapping("/")
  public class ApplicationController {
  
      @RequestMapping(value="/Changes", method = RequestMethod.GET)
      public String inspect(ModelMap model) {
           model.addAttribute("msg", "example");
  
           return "index";
      }
  }
  </code></pre>
  
  <p>in the link: <code>"localhost:8081/ChangesPDF/Changes?..."</code></p>
  
  <p>I'm trying to get the response of this webservice through Alfresco that is in the link: <code>"localhost:8080/share"</code>. I have different ports now (when I have same ports, this works good), so, with different ports I get the error in Alfresco: </p>
  
  <blockquote>
    <p>Cross-Origin Request Blocked: The Same Origin Policy disallows reading
    the remote resource at <a href="http://localhost:8081/ChangesPDF/Changes" rel="nofollow">http://localhost:8081/ChangesPDF/Changes</a>?... (Reason: Header CORS 'Access-Control-Allow-Origin' missing).</p>
  </blockquote>
  
  <p>How can I add this header?</p>