CHAPTER 2 THE NUTS AND BOLTS OF (Hosting your own web site)
CHAPTER 2 THE NUTS AND BOLTS OF AJAX Figure 2-12. Generated error after attempting to load content from another domain Before learning how to change permissions to get around the same origin policy, you need to understand what the policy is. Let s say that I retrieve a document from the server http:// localhost:8080/chap02/factory.html. The same origin policy states that only requests to the same origin can be retrieved. The defined origin is the protocol http, and the host localhost with the port 8080. If any of these values change, any document that is referenced will result in a permission exception. The file http://localhost:8080/rest/cgross/books.xml could be downloaded. The same origin policy exists so that other sites cannot be referenced, as many hackers have used the technique for their malware. Apple Safari Using the Apple Safari browser is a problem in that there is no way to get around the same origin policy. The browser does not have any preferences that can be used to assign trust to a site or web page. Nor is it possible to sign an HTML page to allow cross-domain HTTP requests, or at least that was the status at the time of this writing.
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision virtual web hosting services