Reputation: 1133
I have to deploy a Grails application on a Tomcat server. So I packaged it up into a WAR file, renamed the WAR file to ROOT.war, and replaced the ROOT directory in my Tomcat installation with ROOT.war so that the application would be run off the server root directory.
Whenever I access any page that should be in the web application, I get a 404 not found, with the error mentioning that "The requested resource () could not be found". The parenthesis are always empty no matter what subdirectory I specify.
After spending several hours on that, I looked up deploying the project using Maven. I got stuck Mavenizing the project when Grails couldn't find the proper Maven files.
I later found that it is supposedly possible to deploy Grails applications on Tomcat as "grails tomcat deploy". I got a persistent error about authentication and streaming data. I couldn't find anything on disabling the streaming.
I've already tried every solution that appears to exist online.
Upvotes: 0
Views: 669
Reputation: 3709
Is the application actually deploying? When you look at the Tomcat manager is the application listed there?
If not check your TOMCAT_HOME/conf/server.xml and look at your Host entry. Make sure at least autoDeploy="true" and if you have unpackWARs="true" it will recreate a ROOT directory with the application in it.
I've deployed apps to ROOT before and did not need to modify the app name to ROOT - just change the name of the war file and that's where it is deployed.
Upvotes: 0