users@glassfish.java.net

Setting up Access-Control-Allow-Origin for CORS support

From: <forums_at_java.net>
Date: Fri, 11 Jan 2013 10:57:23 -0600 (CST)

I have REST services running in a Glassfish 3 instance which is acting as the
HTTP server as well. When a jQuery client, coming from a page on another
server, it is encountering the following error: XMLHttpRequest cannot load
http:///rest/Depts. Origin http://localhost is not allowed by
Access-Control-Allow-Origin. Based on the draft W3C standard, Cross Origin
Resource Sharing (CORS), the server responds to client requests with an
"Origin" header with a "Access-Control-Allow-Origin" header:
http://www.w3.org/TR/cors/ Does Glassfish have support for this and or is it
planned for the future? From my examination of the admin console, I didn't
seen an HTTP configuration parameter that mapped to something like this.

--
[Message sent by forum member 'john.brock']
View Post: http://forums.java.net/node/893801