Can't deploy Grails War file in tomcat - results in 404

倖福魔咒の 提交于 2019-12-25 06:26:08

问题


I have a GrailsApplication.war file with me, and i added that into the webapps folder (tomcat 7). When i tried to access the url (<ipaddress>:8080/GrailsApplication) it gives me a 404 error. What have i done wrong deploying the grails war file ?

Grails version : 2.2.4

Tomcat : 7

Server : Ubuntu


回答1:


In Grails 2 apps, there should be a config setting present in Config.groovy as below, verify if that is present:

environments {
    production {
        grails.serverURL = "http://<youripaddress>:8080/${appName}"
    }
}



回答2:


I believe that the grails.serverURL is used by grails to produce urls but not as a configuration to tell tomcat what application will resolve to a specific url. That's handled by the config in tomcat itself.

Try this:

   http://yourdomain:port/GrailsApplication_1.0

And see if your application shows up



来源:https://stackoverflow.com/questions/23664421/cant-deploy-grails-war-file-in-tomcat-results-in-404

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!