问题
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