tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radhakrishna Kalyan <nrkkal...@gmail.com>
Subject Need help with Access-Control-Allow-Origin
Date Thu, 03 Apr 2014 11:50:29 GMT
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>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message