title: Where to put a xsl file in Grails, and how to get the path
body: <p>I need to pass my xsl and read file on the service to generate pdf. i always get an error meesage something like </p>
  
  <p>Document is empty (something might be wrong with your XSLT stylesheet).. Stacktrace follows:
  Message: Document is empty (something might be wrong with your XSLT stylesheet).</p>
  
  <p>i also autowire the file on the bean resource.xml or resource.groovy</p>
  
  <pre><code>class MyClassHolder{
     Resource template
  }
  
  //in my controller
  
  class MyController{
     method(){
     File resource = classHolder.template.file
     def reader = new FileReader(resource)
     myservice.convert(reader)
      }
  }
  </code></pre>