title: request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource
body: <p>I am using backbonejs in my sample appliction. previously, I was hosting this on nodejs but now want to run it on tomcat but this change is giving me an error on the client browser. I search and found that to solve this issue crossdomain (<a href="https://stackoverflow.com/a/33820700/5086633">https://stackoverflow.com/a/33820700/5086633</a>) has to be set to true. Not sure how and were should I handle this. Any help in this regard is highly appreciated. </p>
  
  <pre><code>   XMLHttpRequest cannot load http://localhost:8080/backbonejs/testpost. 
      Response to preflight request doesn't pass access control check: 
  No 'Access-Control-Allow-Origin' header is present on the requested resource.
   Origin 'null' is therefore not allowed access. The response 
  had HTTP status code 403.
  </code></pre>
  
  <p>Using ajaxPrefilter, model and collection as below.</p>
  
  <pre><code>$.ajaxPrefilter( function( options, originalOptions, jqXHR ) {
        options.url = 'http://localhost:8080/backbonejs' + options.url;
      });
  var Banks = Backbone.Collection.extend({
        url: '/testpost'
      });
  
      var Bank = Backbone.Model.extend({
        urlRoot: '/testpost'
      });
  </code></pre>