In my grails application I want to access assets without appending /assets/
This will be useful so that I need not to append /assets where ever I am accessing static assets like html,images etc in my existing angularjs/plaing java code.
In the application.groovy (grails-app/conf) I have added following
grails.assets.mapping=''
This works fine if I don't specify contextpath in application.groovy
Eg: localhost:8080/grails.svg this works fine.
If I specify contextpath in application.groovy
server.'contextPath' = '/AssetsApp'
Eg: localhost:8080/AssetsApp/grails.svg - this will not work and gives 404 error
Generally most of the web applications will have contextPath specified
Grails version : 3.3.2
com.bertramlabs.plugins:asset-pipeline-grails:2.14.7
In my grails application I want to access assets without appending /assets/ This will be useful so that I need not to append /assets where ever I am accessing static assets like html,images etc in my existing angularjs/plaing java code.
Create simple grails application grails create-app
In the application.groovy (grails-app/conf) I have added following grails.assets.mapping='' This works fine if I don't specify contextpath in application.groovy Eg: localhost:8080/grails.svg this works fine.
If I specify contextpath in application.groovy server.'contextPath' = '/AssetsApp' Eg: localhost:8080/AssetsApp/grails.svg - this will not work and gives 404 error Generally most of the web applications will have contextPath specified
Grails version : 3.3.2 com.bertramlabs.plugins:asset-pipeline-grails:2.14.7