Hi everyone, I am facing an issue with my Grails a...
# questions
u
Hi everyone, I am facing an issue with my Grails application using a multi-module structure: i have used Grails version: 6.2.1, Java version: 17 ,Server: Tomcat 9 I built a WAR file for the main project and deployed it in Tomcat. The deployment process was very fast, and the WAR was extracted into a folder under
webapps
. But when I open the app in the browser, I get this error: Status 404 – Not Found i have Checked Tomcat logs (no errors found) ,but The app runs fine locally . Is there any thing to add in build.gradle or something that can help to resolve the issue.
j
Make sure you are following https://docs.grails.org/6.2.1/guide/single.html#deploymentContainer When you are building the war, make sure you are calling it with the subproject name. Replace admin with your subproject name.
./gradlew :admin:war
Does the extracted folder in webapps look correct? My knowledge is a bit limited, since I have used the bootJars with embedded tomcat for a long time.
n
I tried it with Grails 6 and Tomcat 9. It's working. BTW how did you access the app in url ? Did you change the war file name ? Have you set context path in application.groovy/yml ?
u
@N Subedi, Yeah, I have tried to access the app by changing the war name and the context Path in the application.yml name. Also, even then, I got a 404.
u
@James Fredley, subprojects are included as jar files in war. Actually, i am building the main project war where all the subproject are included in it.
👍 1