this is what I am trying to do.
I have made a few .html pages with JavaScript code in it and hosted them on a Yahoo server.
Now when a clien
The local machine also needs a proxy set up that maps "http://localhost:8080/whatever" to the yahoo pages with your Ajax code. In order for the code to work, you must load it in the browser using the domain same domain that it tries to access.
I'm not sure how to do this with Tomcat (?), but one option is to use Apache to proxy both the Tomcat server and the Yahoo pages into the same location.
In Apache, this looks like:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
...
ProxyRequests off
ProxyPass /static http://yahoo.com/path
ProxyPass /myservlet http://localhost:8080/myservlet
You would then load your HTML from localhost/static, and those pages would be able to make AJAX requests to localhost/myservlet.