I am very new to grails. I am making one sample project for loading and displaying images. Now my project uploads the images and saves it to the images.Now directory I want to display all the images stored in the "image" directory. I do not know how to write gsp code to display all the images.
To display the images, I wrote the following code on list.gsp.
My gsp code:
<g:each in="${imageList}" var="image"> <img src="${createLinkTo(dir: 'images', file: '1.jpg')}" alt="Grails"/> </g:each>
imageList has file names in the image directory.
In the second line I want to put the file name instead of "1.jpg".
Can someone tell me how to display images.
thanks
frameworks grails
Donx
source share