title: grails failed to display image in list view
body: <p>I want to display an image in list view of grails project </p>
  
  <p>I have written an action in controller for displaying it in list </p>
  
  <pre><code>def showImage () {
      def testUnitInstance = TestUnit.get(params.testUnitId)
      response.setContentType("image/jpeg")
      response.setContentLength(testUnitInstance.image.size())
      response.outputStream &lt;&lt; testUnitInstance.image
      response.outputStream.flush()
      }
  </code></pre>
  
  <p>in list view i have called that action</p>
  
  <pre><code>&lt;img src="&lt;g:createLink controller='testUnit' action='showImage' 
                      params='[testUnitId:testUnitInstance.id]'/&gt;" height="14px" width="14px" alt="img"
                                      style="padding-left: 20px;"/&gt;
  </code></pre>
  
  <p>but still the image is not displayed anyone suggest me a solution for this</p>