Cross-Origin Resource Sharing is a mechanism that enables cross-origin requests. As you can see in the link , It is easy to enable CORS in Apache Tomcat 7. Just a configuration in the file
As i'm testing a service with Glassfish normally performed over Tomcat in order to decide a migration from Tomcat to Glassfish, i need to enable CORS on Glassfish.
I'm using Glassfish 3.0.1.