Closed kschmit90 closed 9 years ago
'grails war' != 'grails gradle assemble'?
can you please elaborate on the fix? I am observing the same problem. The styles seem to apply in development in my local machine but when deployed as war to production it doesnt apply the styles. I appreciate any help. Thanks!
Windows 7 Grails 3.0.1
Am able to run the app and see CSS/JS when running from command line 'run-app', and am also able to see CSS/JS when running the JAR file with java -jar appName.jar.
I have tested this running a tomcat server locally, as well as a tomcat server running on a dedicated machine with the same results. Tomcat 7
However, when generating a WAR using the 'war' command, and deploying to a tomcat container the script and css link tags are left out of the header and no style is applied to the application.
Inside of the WAR I can see the assets directory with all of the css and js files.
I had the WAS_ENV property set to -Dgrails.env=PRODUCTION in the tomcat container.
In build.gradle - only the relevant bits...
All stylesheets are in grails-app/assets/stylesheets
All javascripts are in grails-app/assets/javascripts
All images are in grails-app/assets/images
grails-app/views/layouts/main.gsp
When I view the source of the deployed page this is what I see.