I want to save and show an image into blob field in oracle 10g using grails. If i use Long raw field in database then it works. But in case of blob field it saves but doesn't show in the view page.

Here is the code:

        class Hotel{
          byte [] pic_
          static mapping={}
          static constraints = {}

        Class contrl
          def save() {
            def hotelInstance = new Hotel(params)
            if (!hotelInstance.save(flush: true)) {
            render(view: "create", model: [hotelInstance: hotelInstance])

              flash.message = message(code: 'default.created.message', args: [message(code:       'hotel.label', default: 'Hotel'), hotelInstance.id])
              redirect(action: "show", id: hotelInstance.id)
        def displayLogo () {
          def sponsor = Hotel.get(params.id)
          response.contentType = "image/jpg"
          response.contentLength = sponsor?.pic_.length
          <td><img src="${createLink(action:'displayLogo ', id:hotelInstance?.id)}"     height="42"    width="42" /> </td>