Hi,
I have a standalone Openejb application which exposes few rest calls.
I am writing a AngularJs application to access those rest methods, but I
was not able to see the data in the angularjs application, but it works
fine when I try to call the rest url from a browser..
Later I discovered that "Access-Control-Allow-Origin" is missing in the
response header.
I have fixed by adding
httpServletResponse.addHeader(CorsHeaderConstants.HEADER_AC_ALLOW_ORIGIN,
"*");
in the rest method.
I tried using @CrossOriginResourceSharing(allowAllOrigins = true) but it
didn't work either.
I would like to know is there any other way of doing this.
Any pointers would be really helpful.
--
Thanks and Regards
N Radhakrishna Kalyan
P: +46 733 312 584
http://about.me/nrkkalyan
<http://about.me/nrkkalyan>