XMLHTTP request error. Eclipse project with tomee7 server.

60 views Asked by At

I have a tomcat tomee7 server set up in eclipse. The server is running with some serverside-code and everything works. But, when i run my client side code and try to do a request i get following error "XMLHttpRequest cannot load file://***** Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https."

What to do?

1

There are 1 answers

2
Gianluca Romeo On

The error suggests that your javascript code is assuming a base url of 'file://' Are you running your client side code by just opening an html file in a browser?