When I deploy my grails generated war file to jetty I get the following error. My question is how de we tell grails where to look for this config file? It works fine for grails run-app because its run from project base where this file exists but gives this error when running withing jetty.
org.codehaus.groovy.grails.commons.cfg.ConfigurationHelper – Unable to load specified config location file:./grails-app/conf/something-config.properties
If you’re bundling the file in with the war, then putting it in
grails-app/confshould put it in the root of the classpath. Move it tosrc/javaif it doesn’t, since that will definitely work both with run-app and in a war. Then register it as an external config in Config.groovy:If you want to deploy it separately from the war (for example to have one war that works in multiple deployments each with its own config file) then you would make the same change to Config.groovy, but copy it to somewhere in Jetty’s classpath. I’m not that familiar with Jetty, but I know that Tomcat’s lib dir is in its classpath, so I put files like this there. I assume there’s an analagous location for Jetty where you can put jars and resources that should be loaded.