tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radhakrishna Kalyan <nrkkal...@gmail.com>
Subject Re: Need help with Access-Control-Allow-Origin
Date Thu, 03 Apr 2014 12:30:26 GMT
Thank you rmannibucau.
I have fixed the issue by adding dependency to "cxf-rt-rs-security-cors"
jar and adding the following property
cxf.jaxrs.providers =
org.apache.cxf.rs.security.cors.CrossOriginResourceSharingFilter




On Thu, Apr 3, 2014 at 1:50 PM, Radhakrishna Kalyan <nrkkalyan@gmail.com>wrote:

> 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>
>



-- 
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