Possible Duplicate:
Grails: displaying created image in gsp
I'm trying to display images from database in <g:each>
tag.
my domain-class:
class Artists {
byte[] image
String artistName
String bio
static constraints = {
image(nullable:true , maxSize:200000)
artistName(nullable:true)
bio(nullable:true, maxSize:2000)
}
}
and artists.gsp :
<g:each in="${dog.Artists.list()}">
<g:img src="${it.image }" width="120" height="160"/> //doesn't work, what should I do here???
<p>Name: ${it.artistName}</p> //works
<p>Biography: ${it.bio}</p> //works
</g:each>
help please !!!