0

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

Illep
  • 16,375
  • 46
  • 171
  • 302

2 Answers2

2

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}"
    }
}
dmahapatro
  • 49,365
  • 7
  • 88
  • 117
  • 1
    It still gives as 404. the WAR file created was `GrailsApplication_1.0.war` and i dropped it in the `webapp` folder. – Illep May 14 '14 at 21:01
  • I'm seeing this behavior as well. This answer ultimately has not solved my issue. i'm using Grails 3.1.10. Run-app runs great.. deploy a war doesn't error in any way. Cannot get past 404. – Kirby Jan 19 '17 at 21:39
  • 1
    @Kirby Answer is not applicable for Grails 3.*. It is only applicable for Grails 2. – dmahapatro Jan 19 '17 at 21:40
  • What are you trying to achieve? You can also post an elaborated question in SO which will help get more attention and ultimately an answer for you. – dmahapatro Jan 19 '17 at 21:50
  • My SO is here. Thank you for your replies. :) http://stackoverflow.com/questions/41752633/404-when-deploying-grails-3-1-10-war-to-tomcat7-or-tomcat8 – Kirby Jan 19 '17 at 22:09
1

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

getbuckts
  • 386
  • 1
  • 4