I am a beginner at the web applications realm and I'm trying to build a simple web site that sends an httprequest
(with javascript XMLHttpRequest
object).
the web page (html) sits on an "HTTP Preview at localhost" server
and the servlet sits on another server "Tomcat v7.0 Server at localhost"
When I try to send the http request I get the next error:
XMLHttpRequest cannot load http://localhost:9999/ebookshop/querymp?author=Tan+Ah+Teck&price=50. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin > 'http://localhost:8080' is therefore not allowed access.
My guess is that it happens because I'm trying to access another server but I don't know how to solve it. On eclipse's browser I see the result and that works fine.