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

2

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

Refine answered 14/5, 2014 at 20:23 Comment(4)
Is grails.serverURL set accordingly in Config.groovy for production env?Tobolsk
What do you mean? sorry i am a beginnerRefine
Ok, added as an answer as that was too much for a comment. :)Tobolsk
Give me a second. Let me try it out.Refine
T
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}"
    }
}
Tobolsk answered 14/5, 2014 at 20:30 Comment(5)
It still gives as 404. the WAR file created was GrailsApplication_1.0.war and i dropped it in the webapp folder.Refine
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.Solo
@Solo Answer is not applicable for Grails 3.*. It is only applicable for Grails 2.Tobolsk
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.Tobolsk
My SO is here. Thank you for your replies. :) #41753133Solo
S
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

Standardize answered 15/5, 2014 at 18:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.