Question

I am trying to run-app my project with other wars/wars also running. So for example we have a war/ear that has legacy web services that I would like to access. My goal is to deploy those existing wars/ears with my run-app. I can deploy both separately, as grails run-app on port 8081 and jboss on port 8080. The problem was when I tried to do a ajax POST, DELETE, or PUT I get a cross-domain error because each app is on its own port. Is there a way to use run-app so that my grails project is at localhost:8080/grails and the webservices are at localhost:8080/webservices

Env: Grails 2.1.1

Server: Jboss (perfered) or vFabric tc Server (by dropping in existing war/war)

Was it helpful?

Solution

I don't believe that you can "run-app" both projects on the same port because you're running an embedded container. However, what you can do is check out the Grails CORS plugin which will allow other domains to access your grails app during run-app or otherwise.

http://grails.org/plugin/cors

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top