I am trying to create a web service and its client.
Web service - JAX- RS (Using jersey for that i.e org.glassfish.jersey.containers)
Client - an Ajax request calling that service.
Basically this webservice data will be accessed from a mobile. So i have to keep domain different.
Code for Webservice's one of the method which I am calling through ajax.
Ajax code.
And the error is "XMLHttpRequest cannot load
http://localhost:8080/TestService/rest/CategoryList No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. "
I searched on the same error on google but not able to find the solution.
Please can any one suggest a solution?