views:

515

answers:

1

I am using a grails application as backend for a Flex frontend. To be able to easily develop and debug my applications I would need to place a crossdomain.xml file into the root of the server, i.e. it must be accessible via http://localhost:8080/crossdomain.xml. Similar use cases might be the deployment of a favicon.ico or a robots.txt, however this can be done in the production environment through a tomcat server with a default root web application.

In my case however I need to have the crossdomain.xml available after running grails run-app. I know that I can move the entire application to the root (http://ca.rroll.net/2009/03/27/configuring-the-grails-root-application-context/) however this is also not what I want, since the grails application should still reside below its default application context.

Does somehow know, how I can do this? Will I have to reconfigure the jetty servlet container of my grails installation somehow?

+1  A: 

I think I found the answer. I haven't tried this yet, so YMMV.

In this article, Colin Harrington discusses making a crossdomain.xml file available at the root of the server by deploying an additional Jetty context.

His technique was first proposed in this blog entry, where the author also discusses using the Static Resources Plugin as another alternative

Johann Zacharee