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
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}"
}
}
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.