samedi 18 avril 2015

grails won't display images in subfolder using tag

I have image files in grails project such as:


grails-app/assets/images/admin/img1.jpg


I am trying to display it as:



<g:img dir="images/admin" file="img1.jpg">


In development environment (grails 2.4), it is not showing up. I get 404. However, if I copy the image in: grails-app/assets/images/img1.jpg


and change code like below:



<g:img dir="images" file="img1.jpg">


it works.


Any idea why it is not working?


Plugin I am using:



build ":tomcat:7.0.55"
// plugins for the compile step
compile ":scaffolding:2.1.2"
compile ':cache:1.1.8'
compile ":asset-pipeline:1.9.9"

// plugins needed at runtime but not for compilation
runtime ":hibernate4:4.3.6.1" // or ":hibernate:3.6.10.18"
runtime ":database-migration:1.4.0"
runtime ":jquery:1.11.1"


Thank you.


Aucun commentaire:

Enregistrer un commentaire