1
votes

I made a Grails War file successfully. when I put the war file (multisite) on tomcat server (web-app folder) and start the server the URL is not working "http://localhost:8080/multisite". I got the message that "The requested resource is not available". Appreciate any help!

1
Which is the port tomcat works on? Have you deployed your application with the prod environment? if so, have you changed the grails.serverURL in Config.groovy? This are just the basic checks. - lucke84
What does the Tomccat log-file say? - cdeszaq
yes I changed the grail.serverURL to ="localhost:8080/${appName}" in prod environment. - Reza
As cdeszaq says, you can check the Tomcat logs to see the errors in the startup of your app. - user800014
When something like thas happens, in most of my cases, the database is not available or there is some problem with model/data bootstraping, so try to check the database, if the taqbles/data are there and if you really can connect from the machine/account, where your TomCat is running. - Tom Metz

1 Answers

2
votes

I solved this problem in this in way. In BuildConfig.groovy file there is "grails.project.war.file = "target/${appName}-${appVersion}.war". when I used only war command it produces MultiSite-0.1.war. I put this war file on tomcat WebApp folder. I can get the first page of URL but not the other pages. It seems that the other URLs are based on the project name without any version. I changed the grails.project.war.file = "target/${appName}.war" and everything was working then.