title: Grails export plugin don't download any file
body: <p>I want to use grails export plugin to get my Domain classes exportables into xls and csv files.</p>
  
  <p>In my main layout named <strong>front.gsp</strong>, I did that :</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
      &lt;head&gt;
          ...
          &lt;g:layoutHead /&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;sec:ifLoggedIn&gt;
          &lt;r:require module="export"/&gt;
          &lt;export:formats formats="['csv', 'excel', 'ods', 'pdf', 'rtf', 'xml']" action="exportTest" /&gt;
          ...
          &lt;g:layoutBody /&gt;
          &lt;r:layoutResources/&gt;
          &lt;script type="text/javascript" src="${resource(dir: 'js', file: 'jquery.min.js')}"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="${resource(dir: 'js', file: 'bootstrap.min.js')}"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="${resource(dir: 'js', file: 'application.js')}"&gt;&lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Into my <strong>DomainClassController.groovy</strong> I did that :</p>
  
  <pre><code>def exportTest() {
          if(!params.max) params.max = 10
  
          if(params?.format &amp;&amp; params.format != "html"){
              response.contentType = grailsApplication.config.grails.mime.types[params.format] response.setHeader("Content-disposition", "attachment; filename=contacts.${params.extension}")
  
              exportService.export(
                  params.format,
                  response.outputStream,
                  ContactDTO.list(params),
                  [:],
                  [:])
              [contactDTOInstanceList: ContactDTO.list( params )]
          }
      }
  </code></pre>
  
  <p>I also create a view named <strong>exportTest.gsp</strong> into my view folder of my controller, just empty file to temporarely solve 404 issue.</p>
  
  <p>I did not have any error messages but when I'm clicking on any export button, I'm redirecting to my page <strong>exportTest.gsp</strong> and <strong><em>no file is downloaded</em></strong></p>
  
  <p>How can I get a downloaded file using grails export plugin ? I follow the user guide, don't have any errors (solved) but no file is created ?</p>
  
  <p>Thanks for reading !</p>
  
  <p>Snite</p>
  
  <p><strong>EDIT :</strong> I just see that, when clicking on export link, the generated url is :</p>
  
  <pre><code>http://localhost:8080/site/controller/action?format=excel&amp;extension=xls
  </code></pre>
  
  <p>But strangely, when making a "println params" into my controller, output is :</p>
  
  <pre><code>[extension:xls, action:exportTest, format:null, controller:contactDTO, max:10]
  </code></pre>
  
  <p>params.format is null BUT set into url ?!!!</p>
  
  <p>Change url like that (and adapting controller code) :</p>
  
  <pre><code>http://localhost:8080/site/controller/action?formatD=excel&amp;extension=xls
  </code></pre>
  
  <p>Give me the following error :</p>
  
  <pre><code>Firefox ne peut trouver le fichier à l'adresse http://localhost:8080/site/controller/action?formatd=excel&amp;extension=xls.
  </code></pre>